FileDocCategorySizeDatePackage
ByteBufferInputStream.javaAPI DocAndroid 5.1 API1270Thu Mar 12 22:22:42 GMT 2015com.android.gallery3d.exif

ByteBufferInputStream

public class ByteBufferInputStream extends InputStream

Fields Summary
private ByteBuffer
mBuf
Constructors Summary
public ByteBufferInputStream(ByteBuffer buf)

        mBuf = buf;
    
Methods Summary
public intread()

        if (!mBuf.hasRemaining()) {
            return -1;
        }
        return mBuf.get() & 0xFF;
    
public intread(byte[] bytes, int off, int len)

        if (!mBuf.hasRemaining()) {
            return -1;
        }

        len = Math.min(len, mBuf.remaining());
        mBuf.get(bytes, off, len);
        return len;