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 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.
-
-
-
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:CharacterStream
Provides access to the underlying data as a Reader.- Specified by:
asReader
in interfaceCharacterStream
- Returns:
- The reader.
-
asString
public String asString()
Description copied from interface:CharacterStream
Provides access to the underlying data as a String.- Specified by:
asString
in interfaceCharacterStream
- Returns:
- The underlying String data
-
getLength
public long getLength()
Description copied from interface:CharacterStream
Retrieve the number of characters.- Specified by:
getLength
in interfaceCharacterStream
- Returns:
- The number of characters.
-
release
public void release()
Description copied from interface:CharacterStream
Release any underlying resources.- Specified by:
release
in interfaceCharacterStream
-
-