Examples of SafeSeekInputStream


Examples of org.archive.io.SafeSeekInputStream

     * @throws IOException  if an IO error occurs
     */
    private SeekInputStream wrap(SeekInputStream input, long pos, int cache)
    throws IOException {
        input.position(pos);
        SeekInputStream r = new SafeSeekInputStream(input);
        r = new OriginSeekInputStream(r, pos);
        r = new BufferedSeekInputStream(r, cache);
        return r;
    }
View Full Code Here

Examples of org.archive.io.SafeSeekInputStream

   
   
    public void testPosition() throws Exception {
        PieceTable table = makePieceTable();
        SeekInputStream asis = new ArraySeekInputStream(QUATRAIN_BYTES);
        asis = new SafeSeekInputStream(asis);
        PieceReader reader = new PieceReader(table, asis);
        StringBuilder sb = new StringBuilder();
        for (int ch = reader.read(); ch > 0; ch = reader.read()) {
            sb.append((char)ch);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.