Class CharacterStreamImpl

java.lang.Object
org.hibernate.engine.jdbc.internal.CharacterStreamImpl
All Implemented Interfaces:
CharacterStream

public class CharacterStreamImpl extends Object implements CharacterStream
Implementation of CharacterStream
  • Constructor Details

    • 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 CharacterStream
      length - The length of the stream
  • Method Details

    • asReader

      public Reader asReader()
      Description copied from interface: CharacterStream
      Provides access to the underlying data as a Reader.
      Specified by:
      asReader in interface CharacterStream
      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 interface CharacterStream
      Returns:
      The underlying String data
    • getLength

      public long getLength()
      Description copied from interface: CharacterStream
      Retrieve the number of characters.
      Specified by:
      getLength in interface CharacterStream
      Returns:
      The number of characters.
    • release

      public void release()
      Description copied from interface: CharacterStream
      Release any underlying resources.
      Specified by:
      release in interface CharacterStream