/** * Update inner stream with a new stream and position * @param newStream new stream -must not be null * @param newpos new position * @throws IOException IO exception on a failure to close the existing * stream. */ private synchronized void updateInnerStream(InputStream newStream, long newpos) throws IOException { Preconditions.checkNotNull(newStream, "Null newstream argument"); closeInnerStream(); in = newStream; this.pos = newpos; }
@Override public synchronized void close() throws IOException { closeInnerStream(); }