Code example for InputStream

Methods: mark

   *          the stream. If {@link #rewind()} is called after so many bytes are 
   *          read from the stream, {@link #rewind()} would fail. 
  public RewindableInputStream(InputStream input, int maxBytesToRemember) {
    this.input = new BufferedInputStream(input, maxBytesToRemember);
  public int read() throws IOException { 
  public int read(byte[] buffer, int offset, int length) throws IOException {
    return, offset, length);
  public void close() throws IOException { 
Contextual code suggestions in your IDE  Get Codota for Java