Package org.postgresql.pljava.internal
Class VarlenaWrapper.Input
java.lang.Object
org.postgresql.pljava.pg.DatumImpl.Input
org.postgresql.pljava.internal.VarlenaWrapper.Input
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Datum
,Datum.Input<DatumImpl.IStream>
,VarlenaWrapper
,DatumImpl
- Enclosing interface:
VarlenaWrapper
A class by which Java reads the content of a varlena.
Associated with a
ResourceOwner
to bound the lifetime of
the native reference; the chosen resource owner must be one that will be
released no later than the memory context containing the varlena.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.postgresql.pljava.adt.spi.Datum
Datum.Accessor<B,
L extends Datum.Layout>, Datum.Input<T extends InputStream & Datum>, Datum.Layout Nested classes/interfaces inherited from interface org.postgresql.pljava.pg.DatumImpl
DatumImpl.Input, DatumImpl.IStream<T extends DatumImpl.Input>
Nested classes/interfaces inherited from interface org.postgresql.pljava.internal.VarlenaWrapper
VarlenaWrapper.Input, VarlenaWrapper.Output, VarlenaWrapper.Verifier
-
Method Summary
Modifier and TypeMethodDescriptionlong
adopt()
Dissociate the datum from Java and return its address to native code.buffer()
void
close()
void
pin()
boolean
toString()
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 JavatoString()
method should passthis
).void
unpin()
Methods inherited from class org.postgresql.pljava.pg.DatumImpl.Input
inputStream, verify
-
Method Details
-
pin
- Specified by:
pin
in interfaceDatum.Input<DatumImpl.IStream>
- Throws:
SQLException
-
pinUnlessReleased
public boolean pinUnlessReleased()- Specified by:
pinUnlessReleased
in interfaceDatum.Input<DatumImpl.IStream>
-
unpin
public void unpin()- Specified by:
unpin
in interfaceDatum.Input<DatumImpl.IStream>
-
buffer
- Specified by:
buffer
in interfaceDatum.Input<DatumImpl.IStream>
- Throws:
SQLException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
toString
- Overrides:
toString
in classDatumImpl.Input
-
toString
Description copied from interface:VarlenaWrapper
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 JavatoString()
method should passthis
).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 interfaceDatumImpl
- Specified by:
toString
in interfaceVarlenaWrapper
- Parameters:
o
- An object whose class name (possibly abbreviated) should be used to prefix the returned string.- Returns:
- Description of this object.
-
adopt
Description copied from interface:DatumImpl
Dissociate the datum from Java and return its address to native code.- Specified by:
adopt
in interfaceDatumImpl
- Throws:
SQLException
-