Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.postgresql.fastpath
Class FastpathArg  view FastpathArg download FastpathArg.java

java.lang.Object
  extended byorg.postgresql.fastpath.FastpathArg

public class FastpathArg
extends java.lang.Object

Each fastpath call requires an array of arguments, the number and type dependent on the function being called.

This class implements methods needed to provide this capability.

For an example on how to use this, refer to the org.postgresql.largeobject package


Field Summary
 byte[] bytes
          Byte value if type=false;
 boolean type
          Type of argument, true=integer, false=byte[]
 int value
          Integer value if type=true
 
Constructor Summary
FastpathArg(byte[] bytes)
          Constructs an argument that consists of an array of bytes
FastpathArg(byte[] buf, int off, int len)
          Constructs an argument that consists of part of a byte array
FastpathArg(int value)
          Constructs an argument that consists of an integer value
FastpathArg(java.lang.String s)
          Constructs an argument that consists of a String.
 
Method Summary
protected  void send(org.postgresql.PG_Stream s)
          This sends this argument down the network stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public boolean type
Type of argument, true=integer, false=byte[]


value

public int value
Integer value if type=true


bytes

public byte[] bytes
Byte value if type=false;

Constructor Detail

FastpathArg

public FastpathArg(int value)
Constructs an argument that consists of an integer value


FastpathArg

public FastpathArg(byte[] bytes)
Constructs an argument that consists of an array of bytes


FastpathArg

public FastpathArg(byte[] buf,
                   int off,
                   int len)
Constructs an argument that consists of part of a byte array


FastpathArg

public FastpathArg(java.lang.String s)
Constructs an argument that consists of a String.

Method Detail

send

protected void send(org.postgresql.PG_Stream s)
             throws java.io.IOException
This sends this argument down the network stream.

The stream sent consists of the length.int4 then the contents.

Note: This is called from Fastpath, and cannot be called from client code.