congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
VisibleBufferedInputStream.peek
Code IndexAdd Tabnine to your IDE (free)

How to use
peek
method
in
org.postgresql.core.VisibleBufferedInputStream

Best Java code snippets using org.postgresql.core.VisibleBufferedInputStream.peek (Showing top 4 results out of 315)

origin: org.postgresql/postgresql

/**
 * Receives a single character from the backend, without advancing the current protocol stream
 * position.
 *
 * @return the character received
 * @throws IOException if an I/O Error occurs
 */
public int peekChar() throws IOException {
 int c = pg_input.peek();
 if (c < 0) {
  throw new EOFException();
 }
 return c;
}
origin: postgresql/postgresql

/**
 * Receives a single character from the backend, without
 * advancing the current protocol stream position.
 *
 * @return the character received
 * @exception IOException if an I/O Error occurs
 */
public int PeekChar() throws IOException
{
  int c = pg_input.peek();
  if (c < 0)
    throw new EOFException();
  return c;
}
origin: org.postgresql/postgresql

/**
 * Check for pending backend messages without blocking. Might return false when there actually are
 * messages waiting, depending on the characteristics of the underlying socket. This is used to
 * detect asynchronous notifies from the backend, when available.
 *
 * @return true if there is a pending backend message
 * @throws IOException if something wrong happens
 */
public boolean hasMessagePending() throws IOException {
 if (pg_input.available() > 0) {
  return true;
 }
 // In certain cases, available returns 0, yet there are bytes
 int soTimeout = getNetworkTimeout();
 setNetworkTimeout(1);
 try {
  return pg_input.peek() != -1;
 } catch (SocketTimeoutException e) {
  return false;
 } finally {
  setNetworkTimeout(soTimeout);
 }
}
origin: org.ancoron.postgresql/org.postgresql

/**
 * Receives a single character from the backend, without
 * advancing the current protocol stream position.
 *
 * @return the character received
 * @exception IOException if an I/O Error occurs
 */
public int PeekChar() throws IOException
{
  int c = pg_input.peek();
  if (c < 0)
    throw new EOFException();
  return c;
}
org.postgresql.coreVisibleBufferedInputStreampeek

Javadoc

Reads a byte from the buffer without advancing the index pointer.

Popular methods of VisibleBufferedInputStream

  • <init>
    Creates a new buffer around the given stream.
  • available
  • close
  • compact
    Compacts the unread bytes of the buffer to the beginning of the buffer.
  • doubleBuffer
    Doubles the size of the buffer.
  • ensureBytes
    Ensures that the buffer contains at least n bytes. This method invalidates the buffer and index fiel
  • getBuffer
    Returns direct handle to the used buffer. Use the #ensureBytesto prefill required bytes the buffer a
  • getIndex
    Returns the current read position in the buffer.
  • moveBufferTo
    Moves bytes from the buffer to the begining of the destination buffer. Also sets the index and endIn
  • read
  • readMore
    Reads more bytes into the buffer.
  • scanCStringLength
    Scans the length of the next null terminated string (C-style string) from the stream.
  • readMore,
  • scanCStringLength,
  • skip

Popular in Java

  • Reactive rest calls using spring rest template
  • putExtra (Intent)
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now