Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public class AoCharArrayWriter extends CharArrayWriter implements Writable
char[]buf, count| Constructor and Description |
|---|
AoCharArrayWriter() |
AoCharArrayWriter(int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
char[] |
getInternalCharArray() |
long |
getLength()
Gets the number of characters represented by this Writable.
|
boolean |
isFastToString()
Checks if the writable will be able to be converted toString in an extremely efficient manner.
|
String |
toString(int off,
int len)
Converts a portion of the input data to a string.
|
void |
writeTo(Encoder encoder,
Writer out)
Writes a streamed version of the object's String representation using the given encoder.
|
void |
writeTo(Encoder encoder,
Writer out,
long off,
long len)
Writes a streamed version of the object's String representation using the given encoder.
|
void |
writeTo(Writer out,
long off,
long len)
Writes a portion of the contents of the buffer to another character stream.
|
append, append, append, close, flush, reset, size, toCharArray, toString, write, write, write, writeTopublic AoCharArrayWriter()
public AoCharArrayWriter(int initialSize)
public char[] getInternalCharArray()
public long getLength()
Writablepublic boolean isFastToString()
WritableisFastToString returns true.
Note: As of Java 1.7.0_06, String.substring(int, int) and related operations now
copy underlying buffers.
isFastToString in interface Writablepublic String toString(int off, int len)
public void writeTo(Writer out, long off, long len) throws IOException
writeTo in interface WritableIOExceptionpublic void writeTo(Encoder encoder, Writer out) throws IOException
Writableencoder.write(this.toString(), out)
were called, but may be a much more efficient implementation.writeTo in interface Writableencoder - if null, no encoding is performed and will be the same as a call to Writable.writeTo(java.io.Writer)IOExceptionpublic void writeTo(Encoder encoder, Writer out, long off, long len) throws IOException
Writableencoder.write(this.toString(), off, len, out)
were called, but may be a much more efficient implementation.writeTo in interface Writableencoder - if null, no encoding is performed and will be the same as a call to Writable.writeTo(java.io.Writer, long, long)IOExceptionCopyright © 2000–2016 AO Industries, Inc.. All rights reserved.