Class CharacterStreamImpl
- java.lang.Object
-
- org.hibernate.engine.jdbc.internal.CharacterStreamImpl
-
- All Implemented Interfaces:
CharacterStream
public class CharacterStreamImpl extends Object implements CharacterStream
Implementation ofCharacterStream
-
-
Constructor Summary
Constructors Constructor Description CharacterStreamImpl(Reader reader, long length)Constructs a CharacterStreamImplCharacterStreamImpl(String chars)Constructs a CharacterStreamImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReaderasReader()Provides access to the underlying data as a Reader.StringasString()Provides access to the underlying data as a String.longgetLength()Retrieve the number of characters.voidrelease()Release any underlying resources.
-
-
-
Constructor Detail
-
CharacterStreamImpl
public CharacterStreamImpl(String chars)
Constructs a CharacterStreamImpl- Parameters:
chars- The String of characters to use backing the CharacterStream
-
CharacterStreamImpl
public CharacterStreamImpl(Reader reader, long length)
Constructs a CharacterStreamImpl- Parameters:
reader- The Reader containing the characters to use backing the CharacterStreamlength- The length of the stream
-
-
Method Detail
-
asReader
public Reader asReader()
Description copied from interface:CharacterStreamProvides access to the underlying data as a Reader.- Specified by:
asReaderin interfaceCharacterStream- Returns:
- The reader.
-
asString
public String asString()
Description copied from interface:CharacterStreamProvides access to the underlying data as a String.- Specified by:
asStringin interfaceCharacterStream- Returns:
- The underlying String data
-
getLength
public long getLength()
Description copied from interface:CharacterStreamRetrieve the number of characters.- Specified by:
getLengthin interfaceCharacterStream- Returns:
- The number of characters.
-
release
public void release()
Description copied from interface:CharacterStreamRelease any underlying resources.- Specified by:
releasein interfaceCharacterStream
-
-