Examples of SeekInputStream


Examples of org.archive.io.SeekInputStream

     * @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.SeekInputStream

   
   
   
    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

Examples of org.archive.io.SeekInputStream

     */
    public static SeekReader getText(BlockFileSystem wordDoc, int cacheSize)
    throws IOException {
        List<Entry> entries = wordDoc.getRoot().list();
        Entry main = find(entries, "WordDocument");
        SeekInputStream mainStream = main.open();
       
        mainStream.position(10);
        int flags = Endian.littleChar(mainStream);
        boolean complex = (flags & 0x0004) == 0x0004;
        boolean tableOne = (flags & 0x0200) == 0x0200;
        String tableName = tableOne ? "1Table" : "0Table";
        Entry table = find(entries, tableName);
        if (LOGGER.isLoggable(Level.FINEST)) {
            LOGGER.finest("Main entry:  " + main);
            LOGGER.finest("Table entry: " + table);
        }
        SeekInputStream tableStream = table.open();
       
        mainStream.position(24);
        int fcMin = Endian.littleInt(mainStream);
        int fcMax = Endian.littleInt(mainStream);
       
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.