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);
}

