Codota Logo
PGStream.Receive
Code IndexAdd Codota to your IDE (free)

How to use
Receive
method
in
org.postgresql.core.PGStream

Best Java code snippets using org.postgresql.core.PGStream.Receive (Showing top 20 results out of 315)

  • Common ways to obtain PGStream
private void myMethod () {
PGStream p =
  • Codota IconString host;new PGStream(host, port)
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

/**
 * Reads in a given number of bytes from the backend
 *
 * @param siz number of bytes to read
 * @return array of bytes received
 * @exception IOException if a data I/O error occurs
 */
public byte[] Receive(int siz) throws IOException
{
  byte[] answer = new byte[siz];
  Receive(answer, 0, siz);
  return answer;
}
origin: postgresql/postgresql

private String receiveCommandStatus() throws IOException {
  //TODO: better handle the msg len
  int l_len = pgStream.ReceiveInteger4();
  //read l_len -5 bytes (-4 for l_len and -1 for trailing \0)
  String status = pgStream.ReceiveString(l_len - 5);
  //now read and discard the trailing \0
  pgStream.Receive(1);
  if (logger.logDebug())
    logger.debug(" <=BE CommandStatus(" + status + ")");
  return status;
}
origin: postgresql/postgresql

try {
  answer[i] = new byte[l_size];
  Receive(answer[i], 0, l_size);
} catch(OutOfMemoryError oome) {
  oom = oome;
origin: postgresql/postgresql

  int type = pgStream.ReceiveInteger4();
  inToken = pgStream.Receive(len - 8);
} else {
origin: postgresql/postgresql

pgStream.Receive(buf, 0, valueLen);
returnValue = buf;
origin: postgresql/postgresql

byte[] bitmask = Receive(bim);
byte[][] answer = new byte[nf][];
    try {
      answer[i] = new byte[len];
      Receive(answer[i], 0, len);
    } catch(OutOfMemoryError oome) {
      oom = oome;
origin: postgresql/postgresql

byte[] salt = pgStream.Receive(2);
byte[] md5Salt = pgStream.Receive(4);
if (logger.logDebug())
origin: postgresql/postgresql

result = pgStream.Receive(len);
c = pgStream.ReceiveChar();
origin: org.ancoron.postgresql/org.postgresql.osgi

private String receiveCommandStatus() throws IOException {
  //TODO: better handle the msg len
  int l_len = pgStream.ReceiveInteger4();
  //read l_len -5 bytes (-4 for l_len and -1 for trailing \0)
  String status = pgStream.ReceiveString(l_len - 5);
  //now read and discard the trailing \0
  pgStream.Receive(1);
  if (logger.logDebug())
    logger.debug(" <=BE CommandStatus(" + status + ")");
  return status;
}
origin: org.ancoron.postgresql/org.postgresql.osgi

try {
  answer[i] = new byte[l_size];
  Receive(answer[i], 0, l_size);
} catch(OutOfMemoryError oome) {
  oom = oome;
origin: org.ancoron.postgresql/org.postgresql.osgi

byte[] bitmask = Receive(bim);
byte[][] answer = new byte[nf][];
    try {
      answer[i] = new byte[len];
      Receive(answer[i], 0, len);
    } catch(OutOfMemoryError oome) {
      oom = oome;
origin: org.ancoron.postgresql/org.postgresql.osgi

/**
 * Reads in a given number of bytes from the backend
 *
 * @param siz number of bytes to read
 * @return array of bytes received
 * @exception IOException if a data I/O error occurs
 */
public byte[] Receive(int siz) throws IOException
{
  byte[] answer = new byte[siz];
  Receive(answer, 0, siz);
  return answer;
}
origin: postgresql/postgresql

byte salt[] = pgStream.Receive(2);
byte[] md5Salt = pgStream.Receive(4);
if (logger.logDebug())
  logger.debug(" <=BE AuthenticationReqMD5(salt=" + Utils.toHexString(md5Salt) + ")");
origin: postgresql/postgresql

byte[] buf = pgStream.Receive(len);
if(op == null) {
  error = new PSQLException(GT.tr("Got CopyData without an active copy operation"), PSQLState.OBJECT_NOT_IN_STATE);
  pgStream.Receive(len); // not in specification; should never appear
origin: org.ancoron.postgresql/org.postgresql

private String receiveCommandStatus() throws IOException {
  //TODO: better handle the msg len
  int l_len = pgStream.ReceiveInteger4();
  //read l_len -5 bytes (-4 for l_len and -1 for trailing \0)
  String status = pgStream.ReceiveString(l_len - 5);
  //now read and discard the trailing \0
  pgStream.Receive(1);
  if (logger.logDebug())
    logger.debug(" <=BE CommandStatus(" + status + ")");
  return status;
}
origin: org.ancoron.postgresql/org.postgresql

try {
  answer[i] = new byte[l_size];
  Receive(answer[i], 0, l_size);
} catch(OutOfMemoryError oome) {
  oom = oome;
origin: org.ancoron.postgresql/org.postgresql

/**
 * Reads in a given number of bytes from the backend
 *
 * @param siz number of bytes to read
 * @return array of bytes received
 * @exception IOException if a data I/O error occurs
 */
public byte[] Receive(int siz) throws IOException
{
  byte[] answer = new byte[siz];
  Receive(answer, 0, siz);
  return answer;
}
origin: org.ancoron.postgresql/org.postgresql

  int type = pgStream.ReceiveInteger4();
  inToken = pgStream.Receive(len - 8);
} else {
origin: org.ancoron.postgresql/org.postgresql.osgi

pgStream.Receive(buf, 0, valueLen);
returnValue = buf;
origin: org.ancoron.postgresql/org.postgresql.osgi

result = pgStream.Receive(len);
c = pgStream.ReceiveChar();
org.postgresql.corePGStreamReceive

Javadoc

Reads in a given number of bytes from the backend

Popular methods of PGStream

  • <init>
    Constructor: Connect to the PostgreSQL back end and return a stream connection.
  • changeSocket
    Switch this stream to using a new socket. Any existing socket is not closed; it's assumed that we ar
  • close
    Closes the connection.
  • flush
    Flush any pending output to the backend.
  • getEncoding
  • getSocket
  • hasMessagePending
    Check for pending backend messages without blocking. Might return false when there actually are mess
  • setEncoding
    Change the encoding used by this connection.
  • ReceiveChar
    Receives a single character from the backend
  • ReceiveEOF
    Consume an expected EOF from the backend
  • ReceiveInteger2
    Receives a two byte integer from the backend
  • ReceiveInteger4
    Receives a four byte integer from the backend
  • ReceiveInteger2,
  • ReceiveInteger4,
  • ReceiveString,
  • ReceiveTupleV2,
  • ReceiveTupleV3,
  • Send,
  • SendChar,
  • SendInteger2,
  • SendInteger4

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • orElseThrow (Optional)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now