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

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

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

origin: javaee/grizzly

@Override
public void ensureBufferCapacity(final int size) throws IOException {
  if (size > bufferSize) {
    throw new IllegalArgumentException("Size exceeds max size limit: " + bufferSize);
  }
  if (getBufferedSize() >= bufferSize) {
    overflow(null);
  }
  if (size == 0) return;
  
  if (buffer != null) {
    final int bufferRemaining = buffer.remaining();
    if (bufferRemaining < size) {
      overflow(null);
      ensureBufferCapacity(size);
    }
  } else {
    buffer = newBuffer(bufferSize);
  }
}
origin: javaee/grizzly

@Override
public GrizzlyFuture<Integer> flush(CompletionHandler<Integer> completionHandler)
    throws IOException {
  return overflow(completionHandler);
}
origin: javaee/grizzly

@Override
public void write(byte data) throws IOException {
  ensureBufferCapacity(1);
  buffer.put(data);
}
origin: javaee/grizzly

  public void close(Integer result) {
    try {
      onClosed();
    } catch (IOException ignored) {
    } finally {
      if (completionHandler != null) {
        completionHandler.completed(result);
      }
      future.result(result);
    }
  }
});
origin: org.glassfish.grizzly/grizzly-websockets-server

  final GrizzlyFuture<Integer> future = flush0(multiBufferWindow,
      completionHandler);
  buffer.flip();
  final GrizzlyFuture<Integer> future = flush0(buffer,
      completionHandler);
  if (future.isDone() && !buffer.isComposite()) {
return flush0(null, completionHandler);
origin: javaee/grizzly

@Override
public GrizzlyFuture<Integer> flush(CompletionHandler<Integer> completionHandler)
    throws IOException {
  return overflow(completionHandler);
}
origin: org.mule.glassfish.grizzly/grizzly-framework

@Override
public void write(byte data) throws IOException {
  ensureBufferCapacity(1);
  buffer.put(data);
}
origin: javaee/grizzly

  public void close(Integer result) {
    try {
      onClosed();
    } catch (IOException ignored) {
    } finally {
      if (completionHandler != null) {
        completionHandler.completed(result);
      }
      future.result(result);
    }
  }
});
origin: javaee/grizzly

  final GrizzlyFuture<Integer> future = flush0(multiBufferWindow,
      completionHandler);
  buffer.flip();
  final GrizzlyFuture<Integer> future = flush0(buffer,
      completionHandler);
  if (future.isDone() && !buffer.isComposite()) {
return flush0(null, completionHandler);
origin: org.glassfish.grizzly/grizzly-core

@Override
public void ensureBufferCapacity(final int size) throws IOException {
  if (size > bufferSize) {
    throw new IllegalArgumentException("Size exceeds max size limit: " + bufferSize);
  }
  if (getBufferedSize() >= bufferSize) {
    overflow(null);
  }
  if (size == 0) return;
  
  if (buffer != null) {
    final int bufferRemaining = buffer.remaining();
    if (bufferRemaining < size) {
      overflow(null);
      ensureBufferCapacity(size);
    }
  } else {
    buffer = newBuffer(bufferSize);
  }
}
origin: javaee/grizzly

@Override
public GrizzlyFuture<Integer> flush(CompletionHandler<Integer> completionHandler)
    throws IOException {
  return overflow(completionHandler);
}
origin: javaee/grizzly

@Override
public void write(byte data) throws IOException {
  ensureBufferCapacity(1);
  buffer.put(data);
}
origin: javaee/grizzly

  public void close(Integer result) {
    try {
      onClosed();
    } catch (IOException ignored) {
    } finally {
      if (completionHandler != null) {
        completionHandler.completed(result);
      }
      future.result(result);
    }
  }
});
origin: javaee/grizzly

  final GrizzlyFuture<Integer> future = flush0(multiBufferWindow,
      completionHandler);
  buffer.flip();
  final GrizzlyFuture<Integer> future = flush0(buffer,
      completionHandler);
  if (future.isDone() && !buffer.isComposite()) {
return flush0(null, completionHandler);
origin: javaee/grizzly

@Override
public void ensureBufferCapacity(final int size) throws IOException {
  if (size > bufferSize) {
    throw new IllegalArgumentException("Size exceeds max size limit: " + bufferSize);
  }
  if (getBufferedSize() >= bufferSize) {
    overflow(null);
  }
  if (size == 0) return;
  
  if (buffer != null) {
    final int bufferRemaining = buffer.remaining();
    if (bufferRemaining < size) {
      overflow(null);
      ensureBufferCapacity(size);
    }
  } else {
    buffer = newBuffer(bufferSize);
  }
}
origin: org.mule.glassfish.grizzly/grizzly-framework

@Override
public GrizzlyFuture<Integer> flush(CompletionHandler<Integer> completionHandler)
    throws IOException {
  return overflow(completionHandler);
}
origin: javaee/grizzly

@Override
public void write(byte data) throws IOException {
  ensureBufferCapacity(1);
  buffer.put(data);
}
origin: org.glassfish.grizzly/grizzly-websockets-server

  public void close(Integer result) {
    try {
      onClosed();
    } catch (IOException ignored) {
    } finally {
      if (completionHandler != null) {
        completionHandler.completed(result);
      }
      future.result(result);
    }
  }
});
origin: javaee/grizzly

  final GrizzlyFuture<Integer> future = flush0(multiBufferWindow,
      completionHandler);
  buffer.flip();
  final GrizzlyFuture<Integer> future = flush0(buffer,
      completionHandler);
  if (future.isDone() && !buffer.isComposite()) {
return flush0(null, completionHandler);
origin: javaee/grizzly

@Override
public void ensureBufferCapacity(final int size) throws IOException {
  if (size > bufferSize) {
    throw new IllegalArgumentException("Size exceeds max size limit: " + bufferSize);
  }
  if (getBufferedSize() >= bufferSize) {
    overflow(null);
  }
  if (size == 0) return;
  
  if (buffer != null) {
    final int bufferRemaining = buffer.remaining();
    if (bufferRemaining < size) {
      overflow(null);
      ensureBufferCapacity(size);
    }
  } else {
    buffer = newBuffer(bufferSize);
  }
}
org.glassfish.grizzly.streamsBufferedOutput

Most used methods

  • ensureBufferCapacity
  • flush0
  • getBufferedSize
  • newBuffer
  • onClosed
  • overflow

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Best IntelliJ plugins
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