Examples of seek()


Examples of org.terrier.utility.io.RandomDataInput.seek()

   */
  public BitIn readReset(long startByteOffset, byte startBitOffset) throws IOException
  {
    try{
      RandomDataInput rdi = (RandomDataInput)rdim.clone();
      rdi.seek(startByteOffset);
      BitIn in = new BitInputStream(rdi);
      in.skipBits(startBitOffset);
      return in;
    } catch (CloneNotSupportedException e) {
      throw new WrappedIOException(e);
View Full Code Here

Examples of org.tmatesoft.hg.internal.InflaterDataAccess.seek()

 
  @Test
  public void testSeek() throws Exception {
    DataAccess zip = zip(testContent1);
    InflaterDataAccess ida = new InflaterDataAccess(zip, 0, zip.length(), -1, new Inflater(), new byte[25], null);
    ida.seek(20);
    final int bufferCapacity = 10;
    ByteBuffer chunk1 = ByteBuffer.allocate(bufferCapacity);
    ida.readBytes(chunk1);
    errorCollector.assertTrue(new ByteArraySlice(testContent1, 20, bufferCapacity).equalsTo(chunk1.array()));
    ida.skip(-bufferCapacity);
View Full Code Here

Examples of picard.illumina.parser.readers.BclReader.seek()

    }

    private CountLimitedIterator makeReader(final List<File> files) {
        if(tileIndex != null) {
            final BclReader bclReader = BclReader.makeSeekable(files, bclQualityEvaluationStrategy, outputMapping.getOutputReadLengths());
            final int numClustersInTile = bclReader.seek(files, tileIndex, currentTile);
            return new CountLimitedIterator(bclReader, numClustersInTile);
        }
        else{
            return null;
        }
View Full Code Here

Examples of ucar.unidata.io.RandomAccessFile.seek()

    g2i.scan(true, false);
    List<Grib2Product> products = g2i.getProducts();
    boolean passOne = true;
    for (int i = 0; i < products.size(); i++) {
      Grib2Product product = products.get(i);
      raf.seek(product.getGdsOffset());
      GdsReader2 gds = new GdsReader2(raf, true);
      Grib2GDSVariables gpv = gds.gdsVars;
      if (passOne) {
        System.out.println(" Section = " + gpv.getSection());
        System.out.println(" Length = " + gpv.getLength());
View Full Code Here

Examples of uk.ac.ucl.panda.utility.io.IndexInput.seek()

        final byte[] b = new byte[toRead];
        IndexInput localFieldsStream = getFieldStream();
        //Throw this IO Exception since IndexREader.document does so anyway, so probably not that big of a change for people
        //since they are already handling this exception when getting the document
        try {
          localFieldsStream.seek(pointer);
          localFieldsStream.readBytes(b, 0, b.length);
          if (isCompressed == true) {
            fieldsData = uncompress(b);
          } else {
            fieldsData = b;
View Full Code Here

Examples of uk.ac.ucl.panda.utility.io.IndexOutput.seek()

            // Write the data offsets into the directory of the compound stream
            it = entries.iterator();
            while(it.hasNext()) {
                FileEntry fe = (FileEntry) it.next();
                os.seek(fe.directoryOffset);
                os.writeLong(fe.dataOffset);
            }

            // Close the output stream. Set the os to null before trying to
            // close so that if an exception occurs during the close, the
View Full Code Here

Examples of uk.ac.ucl.panda.utility.structure.TermDocs.seek()

                                    break;
                                }
                            }
                            /* we have a good term, find the docs */
                           
                            termDocs.seek(enumerator.term());
                            while (termDocs.next()) {
                                bits.set(termDocs.doc());
                            }
                        }
                    } else {
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.