public interface FormatWriter extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
addElement(InternalRow element)
Adds an element to the encoder.
|
boolean |
reachTargetSize(boolean suggestedCheck,
long targetSize)
Check if the writer has reached the
targetSize . |
void addElement(InternalRow element) throws IOException
It may be that adding this element fills up an internal buffer and causes the encoding and flushing of a batch of internally buffered elements.
element
- The element to add.IOException
- Thrown, if the element cannot be added to the encoder, or if the output
stream throws an exception.boolean reachTargetSize(boolean suggestedCheck, long targetSize) throws IOException
targetSize
.suggestedCheck
- Whether it needs to be checked, but subclasses can also decide whether
to check it themselves.targetSize
- The size of the target.IOException
- Thrown if calculating the length fails.Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.