Package org.apache.lucene.store

Examples of org.apache.lucene.store.InputStream.readByte()


        e2.seek(17);
        a2.seek(17);
        assertEquals(17, e2.getFilePointer());
        assertEquals(17, a2.getFilePointer());
        be2 = e2.readByte();
        ba2 = a2.readByte();
        assertEquals(be2, ba2);

        // Finally, make sure the first set didn't move
        // Now make sure the first one didn't move
        assertEquals(1911, e1.getFilePointer());
View Full Code Here


        is.seek(is.length() - 10);
        byte b[] = new byte[100];
        is.readBytes(b, 0, 10);

        try {
            byte test = is.readByte();
            fail("Single byte read past end of file");
        } catch (IOException e) {
            /* success */
            //System.out.println("SUCCESS: single byte read past end of file: " + e);
        }
View Full Code Here

      BitVector deletedDocs = reader.deletedDocs;
      InputStream input = reader.normStream(fi.name);
            int maxDoc = reader.maxDoc();
      try {
        for (int k = 0; k < maxDoc; k++) {
    byte norm = input != null ? input.readByte() : (byte)0;
    if (deletedDocs == null || !deletedDocs.get(k))
      output.writeByte(norm);
        }
      } finally {
        if (input != null)
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.