Package com.aoindustries.io.buffer
Class SegmentedResult
- java.lang.Object
-
- com.aoindustries.io.buffer.SegmentedResult
-
- All Implemented Interfaces:
BufferResult,Writable
public class SegmentedResult extends Object implements BufferResult
This class is not thread safe.- Author:
- AO Industries, Inc.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSegmentedResult(byte[] segmentTypes, Object[] segmentValues, int[] segmentOffsets, int[] segmentLengths, long start, int startSegmentIndex, int startSegmentOffset, int startSegmentLength, long end, int endSegmentIndex, int endSegmentOffset, int endSegmentLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetLength()booleanisFastToString()StringtoString()BufferResulttrim()Trims the contents of this result, as per rules ofStrings.isWhitespace(int), returning the instance that represents this result trimmed.voidwriteTo(Encoder encoder, Writer out)voidwriteTo(Encoder encoder, Writer out, long off, long len)voidwriteTo(Writer out)voidwriteTo(Writer out, long off, long len)
-
-
-
Constructor Detail
-
SegmentedResult
protected SegmentedResult(byte[] segmentTypes, Object[] segmentValues, int[] segmentOffsets, int[] segmentLengths, long start, int startSegmentIndex, int startSegmentOffset, int startSegmentLength, long end, int endSegmentIndex, int endSegmentOffset, int endSegmentLength)
-
-
Method Detail
-
isFastToString
public boolean isFastToString()
- Specified by:
isFastToStringin interfaceWritable
-
toString
public String toString()
-
writeTo
public void writeTo(Writer out) throws IOException
- Specified by:
writeToin interfaceWritable- Throws:
IOException
-
writeTo
public void writeTo(Writer out, long off, long len) throws IOException
- Specified by:
writeToin interfaceWritable- Throws:
IOException
-
writeTo
public void writeTo(Encoder encoder, Writer out) throws IOException
- Specified by:
writeToin interfaceWritable- Throws:
IOException
-
writeTo
public void writeTo(Encoder encoder, Writer out, long off, long len) throws IOException
- Specified by:
writeToin interfaceWritable- Throws:
IOException
-
trim
public BufferResult trim() throws IOException
Description copied from interface:BufferResultTrims the contents of this result, as per rules ofStrings.isWhitespace(int), returning the instance that represents this result trimmed.- Specified by:
trimin interfaceBufferResult- Specified by:
trimin interfaceWritable- Throws:
IOException
-
-