org.apache.poi.poifs.crypt
Class ChunkedCipherOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.poi.poifs.crypt.ChunkedCipherOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
- Direct Known Subclasses:
- BinaryRC4Encryptor.BinaryRC4CipherOutputStream
@Internal
public abstract class ChunkedCipherOutputStream
- extends java.io.FilterOutputStream
Fields inherited from class java.io.FilterOutputStream |
out |
Methods inherited from class java.io.FilterOutputStream |
flush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
chunkSize
protected final int chunkSize
chunkMask
protected final int chunkMask
chunkBits
protected final int chunkBits
ChunkedCipherOutputStream
public ChunkedCipherOutputStream(DirectoryNode dir,
int chunkSize)
throws java.io.IOException,
java.security.GeneralSecurityException
- Throws:
java.io.IOException
java.security.GeneralSecurityException
initCipherForBlock
protected abstract javax.crypto.Cipher initCipherForBlock(javax.crypto.Cipher existing,
int block,
boolean lastChunk)
throws java.security.GeneralSecurityException
- Throws:
java.security.GeneralSecurityException
calculateChecksum
protected abstract void calculateChecksum(java.io.File fileOut,
int oleStreamSize)
throws java.security.GeneralSecurityException,
java.io.IOException
- Throws:
java.security.GeneralSecurityException
java.io.IOException
createEncryptionInfoEntry
protected abstract void createEncryptionInfoEntry(DirectoryNode dir,
java.io.File tmpFile)
throws java.io.IOException,
java.security.GeneralSecurityException
- Throws:
java.io.IOException
java.security.GeneralSecurityException
write
public void write(int b)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
writeChunk
protected void writeChunk()
throws java.io.IOException,
java.security.GeneralSecurityException
- Throws:
java.io.IOException
java.security.GeneralSecurityException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
Copyright 2016 The Apache Software Foundation or
its licensors, as applicable.