public class CharacterStreamImpl extends Object implements CharacterStream
CharacterStream
Constructor and Description |
---|
CharacterStreamImpl(Reader reader,
long length)
Constructs a CharacterStreamImpl
|
CharacterStreamImpl(String chars)
Constructs a CharacterStreamImpl
|
Modifier and Type | Method and Description |
---|---|
Reader |
asReader()
Provides access to the underlying data as a Reader.
|
String |
asString()
Provides access to the underlying data as a String.
|
long |
getLength()
Retrieve the number of characters.
|
void |
release()
Release any underlying resources.
|
public CharacterStreamImpl(String chars)
chars
- The String of characters to use backing the CharacterStreampublic CharacterStreamImpl(Reader reader, long length)
reader
- The Reader containing the characters to use backing the CharacterStreamlength
- The length of the streampublic Reader asReader()
CharacterStream
asReader
in interface CharacterStream
public String asString()
CharacterStream
asString
in interface CharacterStream
public long getLength()
CharacterStream
getLength
in interface CharacterStream
public void release()
CharacterStream
release
in interface CharacterStream
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.