Results 1 to 5 of 5
- 04-08-2010, 08:21 PM #1
Member
- Join Date
- Apr 2010
- Posts
- 6
- Rep Power
- 0
cannot find symbol using BufferedReader.read()
I am reading out of a web page using BufferedReder.read(byte [], int, int) but whatever I enter as byte [] I am told it is "cannot find symbol"
Codesample by Reading a File into a Byte Array | Example DepotJava Code:BufferedReader reader = new BufferedReader(new InputStreamReader( conn.getInputStream(), "UTF-8")); byte [] RawData = new byte[conn.getContentLength()]; int offset = 0; int numRead = 0; while (offset < RawData.length && (numRead = reader.read( RawData, offset, RawData.length-offset)) >= 0) { offset += numRead; } if (offset < RawData.length) { System.err.println("couldn't complete reading MPEG 3-Layer object"); }
Any ideas? thx .. =D
- 04-08-2010, 09:17 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 04-09-2010, 06:02 PM #3
Member
- Join Date
- Apr 2010
- Posts
- 6
- Rep Power
- 0
thx a lot now it works ...
just one more question, why does the error code appear on the "RawData" and not on the ".read(" ? The error even told me that needed parameters were byte [], int, int ?
- 04-09-2010, 06:17 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 04-09-2010, 07:09 PM #5
Member
- Join Date
- Apr 2010
- Posts
- 6
- Rep Power
- 0
Similar Threads
-
Can not find symbol ???
By AliceNewbie in forum New To JavaReplies: 1Last Post: 02-17-2010, 01:44 AM -
BufferedReader error cannot resolve symbol
By SwEeTAcTioN in forum New To JavaReplies: 12Last Post: 10-22-2009, 05:22 AM -
cannot find symbol
By GabWit in forum New To JavaReplies: 3Last Post: 01-25-2009, 12:13 AM -
cannot find symbol symbol :constructor Error. Please help! =(
By KalEl in forum New To JavaReplies: 9Last Post: 10-18-2008, 08:26 PM -
cannot find symbol symbol : class Item location: package platypos.services.order
By officialhopsof in forum New To JavaReplies: 3Last Post: 05-01-2008, 08:30 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks