Java Utililty Methods ByteBuffer to InputStream

List of utility methods to do ByteBuffer to InputStream

Description

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

Method

InputStreamnewInputStream(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 {
...
InputStreamnewInputStream(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) {
...