What steps will reproduce the problem?
1.Launch TestSceneLoading.java
2.
What is the expected output? What do you see instead?
You'll get NullPointerException
What version of the product are you using? On what operating system?
Revision 4825
Please provide any additional information below.
I suggest to do this in J3PFile.java:
private InputStream openStream(J3PEntry entry, String name, Access access){
try{
InputStream entryChan = requestRange(entry.offset, entry.length);
if ((entry.flags & J3PEntry.LZMA_COMPRESSED) != 0){
// wrap with LZMA decomressor
return new LzmaInputStream(entryChan);
}else{
return entryChan;
}
} catch (IOException ex){
logger.log(Level.SEVERE, "Failed to open stream: " + name, ex);
}
return null;
}
private InputStream requestRange(long offset, long length){
try{
ByteBuffer bb = ByteBuffer.allocateDirect((int) length);
channel.read(bb, offset);
bb.clear();
ReadableBufferChannel entryChan = new ReadableBufferChannel(bb);
InputStream in =
java.nio.channels.Channels.newInputStream(entryChan);
return in;
}catch (IOException ex){
logger.log(Level.SEVERE, "Failed to open URL: ", ex);
}
return null;
}
Original issue reported on code.google.com by giuseppe...@hotmail.com on 12 Feb 2010 at 4:43
Original issue reported on code.google.com by
giuseppe...@hotmail.com
on 12 Feb 2010 at 4:43