Package org.postgresql.pljava.internal
Class VarlenaWrapper.Input
java.lang.Object
org.postgresql.pljava.internal.VarlenaWrapper.Input
- All Implemented Interfaces:
Closeable
,AutoCloseable
,VarlenaWrapper
- 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 ClassesNested classes/interfaces inherited from interface org.postgresql.pljava.internal.VarlenaWrapper
VarlenaWrapper.Input, VarlenaWrapper.Output, VarlenaWrapper.Verifier
-
Method Summary
Modifier and TypeMethodDescriptionlong
adopt
(DualState.Key cookie) Return the varlena address to native code and dissociate the varlena from Java.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()
-
Method Details
-
pin
- Throws:
SQLException
-
pinUnlessReleased
public boolean pinUnlessReleased() -
unpin
public void unpin() -
buffer
- Throws:
SQLException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
toString
-
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 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:VarlenaWrapper
Return the varlena address to native code and dissociate the varlena from Java.- Specified by:
adopt
in interfaceVarlenaWrapper
- Parameters:
cookie
- Capability held by native code.- Throws:
SQLException
-