Tabnine Logo
Input
Code IndexAdd Tabnine to your IDE (free)

How to use
Input
in
org.glassfish.grizzly.streams

Best Java code snippets using org.glassfish.grizzly.streams.Input (Showing top 20 results out of 315)

origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public Buffer getBufferWindow() {
  return input.getBuffer();
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public boolean isSupportBufferWindow() {
  return input.isBuffered();
}
origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * {@inheritDoc}
 */
@Override
public byte readByte() throws IOException {
  return input.read();
}
origin: org.glassfish.grizzly/grizzly-core

if (underlyingInput.isBuffered()) {
  chunkBuffer = underlyingInput.takeBuffer();
} else {
  int size = underlyingInput.size();
  chunkBuffer = memoryManager.allocate(size);
  while (size-- >= 0) {
    chunkBuffer.put(underlyingInput.read());
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public void readByteArray(byte[] data, int offset, int length) throws IOException {
  arraySizeCheck(length);
  if (input.isBuffered()) {
    final Buffer buffer = input.getBuffer();
    buffer.get(data, offset, length);
    buffer.shrink();
  } else {
    for(int i = offset; i < length; i++) {
      data[i] = input.read();
    }
  }
}
origin: javaee/grizzly

@Override
protected void onOpenInputSource() throws IOException {
  underlyingInput.notifyCondition(new TransformerCondition(),
      new TransformerCompletionHandler());
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public Buffer takeBufferWindow() {
  return input.takeBuffer();
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public int available() {
  return input.size();
}
origin: javaee/grizzly

@Override
public void skip(int length) {
  input.skip(length);
}
origin: javaee/grizzly

/**
 * Closes the <tt>StreamReader</tt> and causes all subsequent method calls
 * on this object to throw IllegalStateException.
 */
@Override
public void close() {
  if (isClosed.compareAndSet(false, true)) {
    if (input != null) {
      try {
        input.close();
      } catch (IOException ignored) {
      }
    }
  }
}
origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * {@inheritDoc}
 */
@Override
public int readInt() throws IOException {
  if (input.isBuffered()) {
    final Buffer buffer = input.getBuffer();
    if (buffer != null && buffer.remaining() >= 4) {
      final int result = buffer.getInt();
      buffer.shrink();
      return result;
    }
  }
  
  return (readShort() & 0xffff) << 16 | readShort() & 0xffff;
}
origin: javaee/grizzly

@Override
protected void onOpenInputSource() throws IOException {
  underlyingInput.notifyCondition(new TransformerCondition(),
      new TransformerCompletionHandler());
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public Buffer takeBufferWindow() {
  return input.takeBuffer();
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public int available() {
  return input.size();
}
origin: javaee/grizzly

@Override
public void skip(int length) {
  input.skip(length);
}
origin: javaee/grizzly

/**
 * Closes the <tt>StreamReader</tt> and causes all subsequent method calls
 * on this object to throw IllegalStateException.
 */
@Override
public void close() {
  if (isClosed.compareAndSet(false, true)) {
    if (input != null) {
      try {
        input.close();
      } catch (IOException ignored) {
      }
    }
  }
}
origin: javaee/grizzly

@Override
protected void onOpenInputSource() throws IOException {
  underlyingInput.notifyCondition(new TransformerCondition(),
      new TransformerCompletionHandler());
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public Buffer takeBufferWindow() {
  return input.takeBuffer();
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public byte readByte() throws IOException {
  return input.read();
}
origin: org.glassfish.grizzly/grizzly-core

/**
 * {@inheritDoc}
 */
@Override
public int available() {
  return input.size();
}
org.glassfish.grizzly.streamsInput

Most used methods

  • close
  • getBuffer
    Return the Input's Buffer.
  • isBuffered
  • notifyCondition
  • read
  • size
  • skip
  • takeBuffer
    Takes the Input's Buffer. This Input should never try to access this Buffer.

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • JTextField (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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