@Test public void testRead() throws Exception { InputStream decompressed = new LZMAInputStream(compressedData); int in1, in2; long offset = 0; while((in1 = uncompressedData.read()) != -1) { in2 = decompressed.read(); assertEquals("Mismatch at offset " + offset, in1, in2); offset++; } in2 = decompressed.read(); assertEquals("Mismatch at EOF", -1, in2); decompressed.close(); uncompressedData.close(); }
@Override public int read() throws IOException { checkStream(); try { return uncompressedPipeIn.read(); } catch(IOException e) { if(getDecompressionComplete()) { return -1; } throw e; } }
LZMAInputStream extends InputStream implements Runnable { @Override public int read() throws IOException { checkStream(); try { return uncompressedPipeIn.read(); } catch(IOException e) { if(getDecompressionComplete()) { return -1; } throw e; } } }
LZMAInputStream extends InputStream implements Runnable { @Override public int read() throws IOException { checkStream(); try { return uncompressedPipeIn.read(); } catch(IOException e) { if(getDecompressionComplete()) { return -1; } throw e; } } LZMAInputStream(InputStream compressedStream);  LZMAInputStream(InputStream compressedStream, int bufferSize); }
LZMAInputStream extends InputStream implements Runnable { @Override public int read() throws IOException { checkStream(); try { return uncompressedPipeIn.read(); } catch(IOException e) { if(getDecompressionComplete()) { return -1; } throw e; } } LZMAInputStream(InputStream compressedStream);  LZMAInputStream(InputStream compressedStream, int bufferSize); @Override int read(); @Override int available(); @Override void close(); @Override boolean markSupported(); @Override int read(byte[] b, int off, int len); @Override int read(byte[] b); @Override long skip(long n); @Override void run(); }
LZMAInputStream extends InputStream implements Runnable { @Override public int read() throws IOException { checkStream(); try { return uncompressedPipeIn.read(); } catch(IOException e) { if(getDecompressionComplete()) { return -1; } throw e; } } LZMAInputStream(InputStream compressedStream);  LZMAInputStream(InputStream compressedStream, int bufferSize); @Override int read(); @Override int available(); @Override void close(); @Override boolean markSupported(); @Override int read(byte[] b, int off, int len); @Override int read(byte[] b); @Override long skip(long n); @Override void run();  }