public class NIOBufferInputStream
extends java.io.InputStream
Modifier and Type | Field and Description |
---|---|
protected java.nio.ByteBuffer |
buffer |
protected java.nio.channels.Channel |
channel |
static java.lang.String |
REVISION |
Constructor and Description |
---|
NIOBufferInputStream(java.nio.ByteBuffer buffer)
Construct a NIOBufferInputStream with the given buffer
|
NIOBufferInputStream(java.nio.ByteBuffer buffer,
java.nio.channels.Channel channel)
Construct a NIOBufferInputStream with the given buffer and the
given channel.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
void |
mark(int readlimit) |
boolean |
markSupported()
mark is *not* supported.
|
int |
read() |
public static final java.lang.String REVISION
protected java.nio.ByteBuffer buffer
protected java.nio.channels.Channel channel
public NIOBufferInputStream(java.nio.ByteBuffer buffer)
buffer
- the buffer to be wrappedpublic NIOBufferInputStream(java.nio.ByteBuffer buffer, java.nio.channels.Channel channel)
buffer
- the buffer to be wrappedchannel
- the channel the buffer is associated to.public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public void mark(int readlimit)
mark
in class java.io.InputStream
public boolean markSupported()
markSupported
in class java.io.InputStream
Copyright © 2001-2010 Jalios SA. All Rights Reserved.