java.io.InputStreamReader Error

I have an applet which read a file from the server & displays. I am trying to read the length of the file, so that i can display only a part of the file from the end. But I am getting an error as

LfApplet:cannot resolve symbol

symbol:method.length()

location: class java.io.InputStreamReader

nbytes=tempInputStream.length();

here is my code

public void getLog( )

{

String queryBase= getParameter("querybase");

URL tempURL ; //the URL to be loaded

InputStreamReader tempInputStream ; //stream from which to read data

int nread,nbytes = 0 ;

char[] data = new char[100] ;

StringWriter aString = new StringWriter() ;

try {

tempURL = new URL(queryBase);

try {

tempInputStream = new InputStreamReader(tempURL.openStream());

try {

nbytes=tempInputStream.length();

while( (nread = tempInputStream.read(data,nbytes-200,200)) > 0){

aString.write(data,0,nread) ;

}

}

catch(IOException copyEx) {

System.err.println("copyEx: " + copyEx);

}

larea.append(aString.toString()+"\n") ;

} .

catch (IOException retrieveEx) {

System.err.println("retrievEx: " + retrieveEx);

}

}

catch (MalformedURLException murlEx) {

System.err.println("new URL threw ex: " + murlEx);

}

[1380 byte] By [Calis] at [2007-9-27 15:03:17]
# 1
There is no such method, as the error states. If you want the tail end of the data read it into an array or collection and process it from there.
ChuckBing at 2007-7-5 23:03:27 > top of Java-index,Archived Forums,Java Programming...
# 2

The whole point with a stream is that it's a *stream*, i.e. you don't know it's length until you've finished reading it... there is no length() method (have a look at the java.io API ref). All you need to do is keep concatenating the bytes into a String or whatever object until the stream has ended, then just display the last n bytes of the stream.

cgarethc at 2007-7-5 23:03:27 > top of Java-index,Archived Forums,Java Programming...
# 3
Thanks for the response.Could you please let me know how do i read only the last few bytes from the fileI am not sure how to do it..i mean can u show me some psuedo codeThanks
Calis at 2007-7-5 23:03:27 > top of Java-index,Archived Forums,Java Programming...