Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jharks.workflow.util;
 
ByteArrayInputStream implementation that does not synchronize methods.
 
 public class FastByteArrayInputStream extends InputStream {
    
a byte buffer
    protected byte[] buf = null;

    
Indicates the number of bytes that can read from the buffer
    protected int count = 0;

    
The number of bytes that have been read from the buffer
    protected int pos = 0;
    public FastByteArrayInputStream(byte[] bufint count) {
        this. = buf;
        this. = count;
    }
    public final int available() {
        return  - ;
    }
    public final int read() {
        return ( < ) ? ([++] & 0xff) : -1;
    }
    public final int read(byte[] bint offint len) {
        if ( >= )
            return -1;
        if (( + len) > )
            len = ( - );
        System.arraycopy(bofflen);
         += len;
        return len;
    }
    public final long skip(long n) {
        if (( + n) > )
            n =  - ;
        if (n < 0)
            return 0;
         += n;
        return n;
    }
New to GrepCode? Check out our FAQ X