jkff/jzran

net.jzran.RandomAccessGZip.Index state is not initialized to State.VOID when

GoogleCodeExporter opened this issue · 0 comments

What steps will reproduce the problem?
1. I'm using the source code available in the download section.
2.
SeekableInputStream sis = new FileSeekableInputStream(new RandomAccessFile(new 
File("content.zip"), "r"));
RandomAccessGZip.Index index = RandomAccessGZip.index(sis, 1048576);
index.open(sis);
3. new IllegalStateException("Can only call open() once") is thrown in 
net.jzran.RandomAccessGZip.Index.open

What is the expected output? What do you see instead?
Stream should be initialized. IllegalStateException

What version of the product are you using? On what operating system?
WindowsXP 32bit, jzran-0.2-src.zip


Please provide any additional information below.
Suggested fix: 
add this.state = State.VOID; to private Index(List<ZRan.Point> idx, long 
decompressedSize) at line 49 in RandomAccessGZip  

Original issue reported on code.google.com by Vitaly.Sazanovich@gmail.com on 21 Nov 2013 at 2:29