java.lang.Object
com.aoapps.io.buffer.CharArrayBufferResult
- All Implemented Interfaces:
BufferResult
,Writable
A result contained in a single
char[]
.- Author:
- AO Industries, Inc.
-
Constructor Summary
ConstructorDescriptionCharArrayBufferResult
(char[] buffer) CharArrayBufferResult
(char[] buffer, int start, int end) -
Method Summary
Modifier and TypeMethodDescriptionlong
boolean
toString()
trim()
Trims the contents of this result, as per rules ofStrings.isWhitespace(int)
, returning the instance that represents this result trimmed.void
void
void
void
-
Constructor Details
-
CharArrayBufferResult
public CharArrayBufferResult(char[] buffer, int start, int end) - Parameters:
buffer
- No defensive copy is made and assumes the array will not change
-
CharArrayBufferResult
public CharArrayBufferResult(char[] buffer) - Parameters:
buffer
- No defensive copy is made and assumes the array will not change
-
-
Method Details
-
getLength
public long getLength() -
isFastToString
public boolean isFastToString()- Specified by:
isFastToString
in interfaceWritable
-
toString
-
writeTo
- Specified by:
writeTo
in interfaceWritable
- Throws:
IOException
-
writeTo
- Specified by:
writeTo
in interfaceWritable
- Throws:
IOException
-
writeTo
- Specified by:
writeTo
in interfaceWritable
- Throws:
IOException
-
writeTo
- Specified by:
writeTo
in interfaceWritable
- Throws:
IOException
-
trim
Description copied from interface:BufferResult
Trims the contents of this result, as per rules ofStrings.isWhitespace(int)
, returning the instance that represents this result trimmed.All implementations cache the result for constant-time secondary access.
- Specified by:
trim
in interfaceBufferResult
- Specified by:
trim
in interfaceWritable
-