@Override public byte[] read(int length) throws IOException {
  if (length > available()) {
    throw new EndOfBufferException();
  }
  byte[] res=new byte[length];
  System.arraycopy(buffer,read_pos,res,0,length);
  read_pos=read_pos + length;
  return res;
}

@ Override public byte [ ] read ( int length ) throws IOException { if ( length > available ( ) ) { throw new EndOfBufferException ( ) ; } byte [ ] res = new byte [ length ] ; System . arraycopy ( buffer , read_pos , res , 0 , length ) ; read_pos = read_pos + length ; return res ; }
reads vector of opaque values
