[CODE]
void load(String filename) throws FileNotFoundException, IOException {
FileInputStream fis = new FileInputStream(filename);
CBZip2InputStream = new CBZip2InputStream(fis);
}
[/CODE]
As soon as the creation of the CBZip2InputStream is reached, a
NullpointerException is thrown. Why?
Secondly: if the library is corrupted (e.g. doesn't work stable) is
there an alternative to it (Googleing did not help me very much)?
Snyke
--
Andrey Kuznetsov
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities
Whereas HubList and BlackPhoenix my own classes are.
Exception in thread "main" java.lang.NullPointerException
at
org.apache.tools.bzip2.CBZip2InputStream.bsR(CBZip2InputStream.java:323)
at
org.apache.tools.bzip2.CBZip2InputStream.bsGetUChar(CBZip2InputStream.java:341)
at
org.apache.tools.bzip2.CBZip2InputStream.initBlock(CBZip2InputStream.java:230)
at
org.apache.tools.bzip2.CBZip2InputStream.<init>(CBZip2InputStream.java:178)
at HubList.load(HubList.java:19)
InputStream that you pass to CBZip2InputStream' constructor is null.
Check your code.
I have in CBZip2InputStream.java at line 323 following:
"thech = (char) bsStream.read();"
NullPointerException can only be here if bsStream is null.
Why don't you put a breakpoint in CBZip2InputStream.java at line 323 and
looks what's wrong?
I hope this helps.
--
Message posted via http://www.javakb.com