Class CountingOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- net.lingala.zip4j.io.outputstream.CountingOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,OutputStreamWithSplitZipSupport
public class CountingOutputStream extends OutputStream implements OutputStreamWithSplitZipSupport
-
-
Constructor Summary
Constructors Constructor Description CountingOutputStream(OutputStream outputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckBuffSizeAndStartNextSplitFile(int bufferSize)voidclose()intgetCurrentSplitFileCounter()longgetFilePointer()longgetNumberOfBytesWritten()longgetOffsetForNextEntry()longgetSplitLength()booleanisSplitZipFile()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
-
-
-
Constructor Detail
-
CountingOutputStream
public CountingOutputStream(OutputStream outputStream)
-
-
Method Detail
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
getCurrentSplitFileCounter
public int getCurrentSplitFileCounter()
- Specified by:
getCurrentSplitFileCounterin interfaceOutputStreamWithSplitZipSupport
-
getOffsetForNextEntry
public long getOffsetForNextEntry() throws IOException- Throws:
IOException
-
getSplitLength
public long getSplitLength()
-
isSplitZipFile
public boolean isSplitZipFile()
-
getNumberOfBytesWritten
public long getNumberOfBytesWritten() throws IOException- Throws:
IOException
-
checkBuffSizeAndStartNextSplitFile
public boolean checkBuffSizeAndStartNextSplitFile(int bufferSize) throws ZipException- Throws:
ZipException
-
getFilePointer
public long getFilePointer() throws IOException- Specified by:
getFilePointerin interfaceOutputStreamWithSplitZipSupport- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
-