Codota Logo
PGCopyInputStream.gotBuf
Code IndexAdd Codota to your IDE (free)

How to use
gotBuf
method
in
org.postgresql.copy.PGCopyInputStream

Best Java code snippets using org.postgresql.copy.PGCopyInputStream.gotBuf (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

public int read(byte[] buf, int off, int siz) throws IOException {
  checkClosed();
  int got = 0;
  while( got < siz && gotBuf() ) {
    buf[off+got++] = this.buf[at++];
  }
  return got;
}
origin: org.postgresql/postgresql

public int read(byte[] buf, int off, int siz) throws IOException {
 checkClosed();
 int got = 0;
 boolean didReadSomething = false;
 while (got < siz && (didReadSomething = gotBuf())) {
  buf[off + got++] = this.buf[at++];
 }
 return got == 0 && !didReadSomething ? -1 : got;
}
origin: org.postgresql/postgresql

public int read() throws IOException {
 checkClosed();
 return gotBuf() ? buf[at++] : -1;
}
origin: postgresql/postgresql

public int read() throws IOException {
  checkClosed();
  return gotBuf() ? buf[at++] : -1;
}
origin: org.postgresql/postgresql

public byte[] readFromCopy() throws SQLException {
 byte[] result = buf;
 try {
  if (gotBuf()) {
   if (at > 0 || len < buf.length) {
    byte[] ba = new byte[len - at];
    for (int i = at; i < len; i++) {
     ba[i - at] = buf[i];
    }
    result = ba;
   }
   at = len; // either partly or fully returned, buffer is exhausted
  }
 } catch (IOException ioe) {
  throw new PSQLException(GT.tr("Read from copy failed."), PSQLState.CONNECTION_FAILURE);
 }
 return result;
}
origin: postgresql/postgresql

public byte[] readFromCopy() throws SQLException {
  byte[] result = buf;
  try {
    if(gotBuf()) {
      if(at>0 || len < buf.length) {
        byte[] ba = new byte[len-at];
        for(int i=at; i<len; i++)
          ba[i-at] = buf[i];
        result = ba;
      }
      at = len; // either partly or fully returned, buffer is exhausted
    }
  } catch(IOException ioe) {
    throw new PSQLException(GT.tr("Read from copy failed."), PSQLState.CONNECTION_FAILURE);
  }
  return result;
}
origin: org.ancoron.postgresql/org.postgresql

public int read(byte[] buf, int off, int siz) throws IOException {
  checkClosed();
  int got = 0;
  while( got < siz && gotBuf() ) {
    buf[off+got++] = this.buf[at++];
  }
  return got;
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public int read(byte[] buf, int off, int siz) throws IOException {
  checkClosed();
  int got = 0;
  while( got < siz && gotBuf() ) {
    buf[off+got++] = this.buf[at++];
  }
  return got;
}
origin: org.ancoron.postgresql/org.postgresql

public int read() throws IOException {
  checkClosed();
  return gotBuf() ? buf[at++] : -1;
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public int read() throws IOException {
  checkClosed();
  return gotBuf() ? buf[at++] : -1;
}
origin: org.ancoron.postgresql/org.postgresql

public byte[] readFromCopy() throws SQLException {
  byte[] result = buf;
  try {
    if(gotBuf()) {
      if(at>0 || len < buf.length) {
        byte[] ba = new byte[len-at];
        for(int i=at; i<len; i++)
          ba[i-at] = buf[i];
        result = ba;
      }
      at = len; // either partly or fully returned, buffer is exhausted
    }
  } catch(IOException ioe) {
    throw new PSQLException(GT.tr("Read from copy failed."), PSQLState.CONNECTION_FAILURE);
  }
  return result;
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public byte[] readFromCopy() throws SQLException {
  byte[] result = buf;
  try {
    if(gotBuf()) {
      if(at>0 || len < buf.length) {
        byte[] ba = new byte[len-at];
        for(int i=at; i<len; i++)
          ba[i-at] = buf[i];
        result = ba;
      }
      at = len; // either partly or fully returned, buffer is exhausted
    }
  } catch(IOException ioe) {
    throw new PSQLException(GT.tr("Read from copy failed."), PSQLState.CONNECTION_FAILURE);
  }
  return result;
}
org.postgresql.copyPGCopyInputStreamgotBuf

Popular methods of PGCopyInputStream

  • checkClosed
  • read
  • readFromCopy

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • orElseThrow (Optional)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
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