net.lingala.zip4j.io
Class CipherOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by net.lingala.zip4j.io.BaseOutputStream
          extended by net.lingala.zip4j.io.CipherOutputStream
All Implemented Interfaces:
Closeable, Flushable
Direct Known Subclasses:
DeflaterOutputStream

public class CipherOutputStream
extends BaseOutputStream


Field Summary
protected  CRC32 crc
           
protected  FileHeader fileHeader
           
protected  LocalFileHeader localFileHeader
           
protected  OutputStream outputStream
           
protected  ZipModel zipModel
           
protected  ZipParameters zipParameters
           
 
Constructor Summary
CipherOutputStream(OutputStream outputStream, ZipModel zipModel)
           
 
Method Summary
 void close()
           
 void closeEntry()
           
 void decrementCompressedFileSize(int value)
           
 void finish()
           
 File getSourceFile()
           
 void putNextEntry(File file, ZipParameters zipParameters)
           
 void setSourceFile(File sourceFile)
           
protected  void updateTotalBytesRead(int toUpdate)
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int bval)
           
 
Methods inherited from class java.io.OutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputStream

protected OutputStream outputStream

fileHeader

protected FileHeader fileHeader

localFileHeader

protected LocalFileHeader localFileHeader

zipParameters

protected ZipParameters zipParameters

zipModel

protected ZipModel zipModel

crc

protected CRC32 crc
Constructor Detail

CipherOutputStream

public CipherOutputStream(OutputStream outputStream,
                          ZipModel zipModel)
Method Detail

putNextEntry

public void putNextEntry(File file,
                         ZipParameters zipParameters)
                  throws ZipException
Throws:
ZipException

write

public void write(int bval)
           throws IOException
Overrides:
write in class BaseOutputStream
Throws:
IOException

write

public void write(byte[] b)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException

closeEntry

public void closeEntry()
                throws IOException,
                       ZipException
Throws:
IOException
ZipException

finish

public void finish()
            throws IOException,
                   ZipException
Throws:
IOException
ZipException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException

decrementCompressedFileSize

public void decrementCompressedFileSize(int value)

updateTotalBytesRead

protected void updateTotalBytesRead(int toUpdate)

setSourceFile

public void setSourceFile(File sourceFile)

getSourceFile

public File getSourceFile()


Copyright © 2012. All Rights Reserved.