Results 1 to 3 of 3
Thread: Byte Ranges
- 02-11-2010, 12:39 PM #1
Member
- Join Date
- Feb 2010
- Posts
- 2
- Rep Power
- 0
Byte Ranges
Hi
with this code, I can read some bytes in a position of the remote file.
My problem is that i wanna read more ranges of bytes,Java Code:HttpURLConnection connection = (HttpURLConnection) new URL( "http://abc.it/file.txt").openConnection(); connection.setRequestProperty( "Range", "bytes=1000-1049" ); BufferedReader source = new BufferedReader( new InputStreamReader( connection.getInputStream()) ); System.out.println( source.readLine() );
How can I do?
- 02-12-2010, 10:36 PM #2
Member
- Join Date
- Aug 2009
- Posts
- 76
- Rep Power
- 0
What do you mean?
If
connection.setRequestProperty( "Range", "bytes=1000-1049" );
works as you say, then why not just change the 2nd parameter to the desired range??? I'm so confused.
- 02-14-2010, 11:48 AM #3
Member
- Join Date
- Feb 2010
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
TCP send byte
By Koren3 in forum NetworkingReplies: 4Last Post: 05-25-2009, 07:08 AM -
Printing ranges of numbers using if/else statements
By russbuss106 in forum New To JavaReplies: 8Last Post: 03-05-2009, 05:03 AM -
Byte Array
By sandor in forum New To JavaReplies: 12Last Post: 01-15-2009, 03:31 AM -
using Byte arrays
By mew in forum New To JavaReplies: 2Last Post: 01-30-2008, 03:54 AM -
int to byte
By ravian in forum New To JavaReplies: 1Last Post: 01-13-2008, 07:22 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks