code: public DerInputStream subStream(int len, boolean do_skip)
      throws IOException {
          DerInputBuffer  newbuf = buffer.dup();
  
          newbuf.truncate(len);
          if (do_skip) {
              buffer.skip(len);
          }
          return new DerInputStream(newbuf);
      }
docs: Creates a new DER input stream from part of this input stream.
  
  @param len how long a chunk of the current input stream to use,
  starting at the current position.
  @param do_skip true if the existing data in the input stream should
  be skipped.  If this value is false, the next data read
  on this stream and the newly created stream will be the
  same.