| gnu.mapping.OutPort gnu.mapping.CharArrayOutPort
CharArrayOutPort | public class CharArrayOutPort extends OutPort (Code) | | Similar to CharArrayWriter.
|
Method Summary | |
public void | close() Do nothing. | protected boolean | closeOnExit() No point in registering this port with a WriterManager. | public int | length() | public void | reset() | public void | setLength(int length) | public char[] | toCharArray() Returns the written data as a freshly copied
char array. | public String | toString() Returns the written data as a new
String . | public String | toSubString(int beginIndex, int endIndex) Returns a substring of the written data as a new
String . | public String | toSubString(int beginIndex) Returns a substring of the written data as a new
String . | public void | writeTo(Consumer out) | public void | writeTo(int start, int count, Consumer out) |
CharArrayOutPort | public CharArrayOutPort()(Code) | | |
close | public void close()(Code) | | Do nothing.
This allows access to the buffer after the port is closed.
Not clear whether this is a good or bad idea, but it matches
ByteArrayOutputStream, CharArrayWriter, and StringWriter.
|
closeOnExit | protected boolean closeOnExit()(Code) | | No point in registering this port with a WriterManager.
|
length | public int length()(Code) | | |
reset | public void reset()(Code) | | |
setLength | public void setLength(int length)(Code) | | |
toCharArray | public char[] toCharArray()(Code) | | Returns the written data as a freshly copied
char array.
|
toString | public String toString()(Code) | | Returns the written data as a new
String .
|
toSubString | public String toSubString(int beginIndex, int endIndex)(Code) | | Returns a substring of the written data as a new
String .
Equivalent to
toString().substring(beginIndex, endIndex) but more efficient.
|
toSubString | public String toSubString(int beginIndex)(Code) | | Returns a substring of the written data as a new
String .
Equivalent to
toString().substring(beginIndex) but more efficient.
|
|
|