public final class ChannelWriterOutputView extends AbstractPagedOutputView implements Closeable
DataOutputView that is backed by a FileIOChannel, making it effectively a data
output stream. The view will compress its data before writing it in blocks to the underlying
channel.currentSegment, segmentSize| Constructor and Description |
|---|
ChannelWriterOutputView(BufferFileWriter writer,
BlockCompressionFactory compressionCodecFactory,
int compressionBlockSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
closeAndDelete() |
int |
getBlockCount() |
FileIOChannel |
getChannel() |
long |
getNumBytes() |
long |
getNumCompressedBytes() |
long |
getWriteBytes() |
protected MemorySegment |
nextSegment(MemorySegment current,
int positionInCurrent)
This method must return a segment.
|
advance, clear, getCurrentPositionInSegment, getCurrentSegment, getSegmentSize, seekOutput, skipBytesToWrite, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFpublic ChannelWriterOutputView(BufferFileWriter writer, BlockCompressionFactory compressionCodecFactory, int compressionBlockSize)
public FileIOChannel getChannel()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void closeAndDelete()
throws IOException
IOExceptionprotected MemorySegment nextSegment(MemorySegment current, int positionInCurrent) throws IOException
AbstractPagedOutputViewEOFException.nextSegment in class AbstractPagedOutputViewcurrent - The current memory segmentpositionInCurrent - The position in the segment, one after the last valid byte.IOExceptionpublic long getNumBytes()
public long getNumCompressedBytes()
public long getWriteBytes()
public int getBlockCount()
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.