{"id":5431,"date":"2014-03-30T21:55:18","date_gmt":"2014-03-30T21:55:18","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-read-open-files-with-space-in-name-collection-of-common-programming-errors\/"},"modified":"2014-03-30T21:55:18","modified_gmt":"2014-03-30T21:55:18","slug":"how-to-read-open-files-with-space-in-name-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-read-open-files-with-space-in-name-collection-of-common-programming-errors\/","title":{"rendered":"How to read\/open files with space in name-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to develop a server for <code>mplayer<\/code> using Java but I can&#8217;t open files that have spaces in name (e.g. &#8220;File with space.mp3&#8221;).<\/p>\n<p>I&#8217;m following this tutorial here. The problem is, every time I try to open a file with spaces in name the <code>getInputStream()<\/code> read only the string before the space, generating a &#8220;file not found&#8221; error.<\/p>\n<p>The path are correct in command, I tried even different formats (e.g. &#8220;File\\ with\\ space.mp3&#8221;, &#8220;$PATH\/File with space.mp3&#8221;, etc), but nothing works.<\/p>\n<p>What can I do to get data properly from <code>getInputStream<\/code>? How to avoid <code>getInputStream<\/code> to block when it founds a space in the String?<\/p>\n<p>Ps. I use a linux system and the codes are the same as the link above (ctrl+c , ctrl+v).<\/p>\n<p>thanks for the help.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to develop a server for mplayer using Java but I can&#8217;t open files that have spaces in name (e.g. &#8220;File with space.mp3&#8221;). I&#8217;m following this tutorial here. The problem is, every time I try to open a file with spaces in name the getInputStream() read only the string before the space, generating a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5431","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5431"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5431\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}