public void reset ( ) throws IOException { if ( file == null ) { ( ( ByteArrayInputStream ) is ) . reset ( ) ; } else { if ( fos != null ) { while ( skip ( 4096 ) > 0 ) ; fos . close ( ) ; fos = null ; if ( length == - 1 ) { length = totalBytesRead ; } } is . close ( ) ; is = new FileInputStream ( file ) ; } totalBytesRead = 0 ; }
Resets the stream to its beginning so it can be read again .