public class OutStream extends PositionedOutputStream
| Modifier and Type | Field and Description |
|---|---|
static int |
HEADER_SIZE |
| Constructor and Description |
|---|
OutStream(Object name,
StreamOptions options,
PhysicalWriter.OutputReceiver receiver) |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertBufferSizeValid(int bufferSize)
Throws exception if the bufferSize argument equals or exceeds 2^(3*8 - 1).
|
void |
changeIv(Consumer<byte[]> modifier)
Change the current Initialization Vector (IV) for the encryption.
|
void |
flush() |
long |
getBufferSize()
Get the memory size currently allocated as buffer associated with this
stream.
|
void |
getPosition(PositionRecorder recorder)
Record the current position to the recorder.
|
void |
suppress()
Set suppress flag
|
String |
toString() |
void |
write(byte[] bytes,
int offset,
int length) |
void |
write(int i) |
close, writepublic static final int HEADER_SIZE
public OutStream(Object name, StreamOptions options, PhysicalWriter.OutputReceiver receiver)
public void changeIv(Consumer<byte[]> modifier)
changeIv in class PositionedOutputStreammodifier - a function to modify the IV in placepublic static void assertBufferSizeValid(int bufferSize)
throws IllegalArgumentException
writeHeader(ByteBuffer, int, int, boolean).
The bufferSize needs to be expressible in 3 bytes, and uses the least significant byte
to indicate original/compressed bytes.bufferSize - The ORC compression buffer size being checked.IllegalArgumentException - If bufferSize value exceeds threshold.public void write(int i)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] bytes,
int offset,
int length)
throws IOException
write in class OutputStreamIOExceptionpublic void getPosition(PositionRecorder recorder)
PositionedOutputStreamgetPosition in class PositionedOutputStreamrecorder - the object that receives the positionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic long getBufferSize()
PositionedOutputStreamgetBufferSize in class PositionedOutputStreampublic void suppress()
Copyright © 2013–2023 The Apache Software Foundation. All rights reserved.