Interface VarlenaWrapper

All Superinterfaces:
AutoCloseable, Closeable, Datum, DatumImpl
All Known Implementing Classes:
VarlenaWrapper.Input, VarlenaWrapper.Output

public interface VarlenaWrapper extends Closeable, DatumImpl
Interface that wraps a PostgreSQL native variable-length ("varlena") datum; implementing classes present an existing one to Java as a readable InputStream, or allow a new one to be constructed by presenting a writable OutputStream.

Common to both is a method adopt(), allowing native code to reassert control over the varlena (for the writable variety, after Java code has written and closed it), after which it is no longer accessible from Java.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A class by which Java reads the content of a varlena.
    static class 
    A class by which Java writes the content of a varlena as an OutputStream.
    static class 
    A Verifier verifies the proper form of content written to a VarlenaWrapper.Output.

    Nested classes/interfaces inherited from interface org.postgresql.pljava.adt.spi.Datum

    Datum.Accessor<B,L extends Datum.Layout>, Datum.Layout

    Nested classes/interfaces inherited from interface org.postgresql.pljava.pg.DatumImpl

    DatumImpl.IStream<T extends DatumImpl.Input>
  • Method Summary

    Modifier and Type
    Method
    Description
    Return a string describing this object in a way useful for debugging, prefixed with the name (abbreviated for comfort) of the class of the object passed in (the normal Java toString() method should pass this).

    Methods inherited from interface java.io.Closeable

    close

    Methods inherited from interface org.postgresql.pljava.pg.DatumImpl

    adopt, verify, verify
  • Method Details

    • toString

      String toString(Object o)
      Return a string describing this object in a way useful for debugging, prefixed with the name (abbreviated for comfort) of the class of the object passed in (the normal Java toString() method should pass this).

      Subclasses or consumers are encouraged to call this method and append further details specific to the subclass or consumer. The convention should be that the recursion will stop at some class that will actually construct the abbreviated class name of o and use it to prefix the returned value.

      Specified by:
      toString in interface DatumImpl
      Parameters:
      o - An object whose class name (possibly abbreviated) should be used to prefix the returned string.
      Returns:
      Description of this object.