Code example for InputStream

Methods: mark

0
    wrappedInputStream.close();
  } 
 
  @Override 
  public synchronized void mark(final int readlimit) {
    wrappedInputStream.mark(readlimit);
  } 
 
  @Override 
  public boolean markSupported() { 
    return wrappedInputStream.markSupported();
  } 
 
  @Override 
  public int read(final byte[] b, final int off, final int len) throws IOException {
    if (buffer.size() > 0) {
      int tot2Read = Math.min(buffer.size(), len);
 
      for (int i = 0; i < tot2Read; ++i) {
        b[i] = (byte) buffer.remove(0).byteValue();