Class FixedLengthBlockOutputStream.BufferAtATimeOutputChannel
java.lang.Object
org.apache.commons.compress.utils.FixedLengthBlockOutputStream.BufferAtATimeOutputChannel
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Channel
,WritableByteChannel
- Enclosing class:
- FixedLengthBlockOutputStream
private static class FixedLengthBlockOutputStream.BufferAtATimeOutputChannel
extends Object
implements WritableByteChannel
Helper class to provide channel wrapper for arbitrary output stream that doesn't alter the
size of writes. We can't use Channels.newChannel, because for non FileOutputStreams, it
breaks up writes into 8KB max chunks. Since the purpose of this class is to always write
complete blocks, we need to write a simple class to take care of it.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
out
-
closed
-
-
Constructor Details
-
BufferAtATimeOutputChannel
-
-
Method Details
-
write
- Specified by:
write
in interfaceWritableByteChannel
- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-