Java Utililty Methods ByteBuffer to InputStream

List of utility methods to do ByteBuffer to InputStream

  1. HOME
  2. Java
  3. B
  4. ByteBuffer to InputStream

Description

The list of methods to do ByteBuffer to InputStream are organized into topic(s).

Method

InputStream newInputStream(final ByteBuffer buf)
new Input Stream
return new InputStream() {
 public synchronized int read() throws IOException {
 if (!buf.hasRemaining()) {
 return -1;
 return buf.get();
 public synchronized int read(byte[] bytes, int off, int len) throws IOException {
...
InputStream newInputStream(final ByteBuffer buf)
new Input Stream
return new InputStream() {
 private int mark = -1;
 @Override
 public boolean markSupported() {
 return true;
 @Override
 public void mark(int readLimit) {
...

AltStyle によって変換されたページ (->オリジナル) /