URLConnection.getInputStream: specifying byte range start but no end <p>My goal is to read only the bytes from a file on a remote server starting at a particular byte position in the file without unnecessary data transfer. My concern is that without specifying an end byte, the entire file from the start byte is put into a buffer before any reads occur. </p> <p>When one specifies a byte range in this fashion:</p> <pre><code>urlConn.setRequestProperty("Range","bytes="+byteRangeStart+"-") </code></pre> <p>and then subsequently obtains an InputStream, will that InputStream contain all the bytes of the file from byteRangeStart to the end of the file meaning that all the data is transferred when the InputStream is obtained or are bytes only transferred when the InputStream is read from?</p>