Examples of seek()


Examples of javax.media.protocol.Seekable.seek()

      if (TRACE) System.out.println(" return " + -1);
        logger.warning("seek: Invalid whence value: " + whence);
        return -1;
      }
     
      final long ret = seekable.seek(seekTo);
      curpos = ret;
      if (TRACE) System.out.println(" return " + ret);
      return ret;
    }
    catch (IOException e)
View Full Code Here

Examples of jcifs.smb.SmbRandomAccessFile.seek()

        byte[] buf = new byte[BUFFER_SIZE];

        SmbRandomAccessFile raf = new SmbRandomAccessFile(smbFile, "r");

        raf.seek(fileOffset);

        int bc;
        int rem = dest.remaining();
        while ((bc = raf.read(buf)) > 0 && rem > 0) {
            dest.put(buf, 0, Math.min(bc, dest.remaining()));
View Full Code Here

Examples of loci.common.IRandomAccess.seek()

    IRandomAccess is = Location.getHandle(getCurrentFile(), false);
    is.setOrder(ByteOrder.LITTLE_ENDIAN);
    final ContainerRecord dataSet = dataSets.get(getSeries());
    for (IM3Record subRec:dataSet.parseChunks(is)){
      if (subRec.name.equals(FIELD_DATA)) {
        is.seek(subRec.offset+4);
        int width = is.readInt();
        int height = is.readInt();
        int channels = is.readInt();
        final byte [] result = new byte [width * height * channels * 2];
        is.read(result);
 
View Full Code Here

Examples of loci.common.RandomAccessInputStream.seek()

    IFD ifd = tiffParser.getFirstIFD();
    RandomAccessInputStream ras = getCZTag(ifd);
    if (ras == null) return 1;
    ras.order(littleEndian);

    ras.seek(264);
    dimensionP = ras.readInt();
    dimensionM = ras.readInt();
    ras.close();

    int nSeries = dimensionM * dimensionP;
 
View Full Code Here

Examples of me.aurous.ui.panels.ControlPanel.seek()

    // player.play();

    player.setOnReady(() -> {
      player.setAutoPlay(false);
      panel.seek().setValue(0);
      if (sourceURL
          .contains("https://www.youtube.com/watch?v=kGubD7KG9FQ")) {
        player.pause();
      } else {
        player.play();
View Full Code Here

Examples of net.nutch.fs.NFSDataInputStream.seek()

    final long end = start + split.getLength();

    // open the file and seek to the start of the split
    final NFSDataInputStream in =
      new NFSDataInputStream(split.getFileSystem().open(split.getFile()));
    in.seek(start);
   
    if (start != 0) {
      while (in.getPos() < end) {    // scan to the next newline in the file
        char c = (char)in.read();    // bug: this assumes eight-bit characters.
        if (c == '\r' || c == '\n') {
View Full Code Here

Examples of net.sf.samtools.util.SeekableFileStream.seek()

                query.end - query.start));

            bis.close();

            SAMIterator it = new SAMIterator(is, refFile);
            is.seek(entries.get(0).containerStartOffset);
            BAMQueryFilteringIterator bit = new BAMQueryFilteringIterator(
                it, query.sequence, query.start, query.end,
                BAMQueryFilteringIterator.QueryType.CONTAINED,
                reader.getFileHeader());
            source.it = bit;
View Full Code Here

Examples of net.sf.samtools.util.SeekableStream.seek()

    } else if (is instanceof SeekableStream)
      s = (SeekableStream) is;

    SAMIterator si = null;
    try {
      s.seek(0);
      si = new SAMIterator(s, referenceSequenceFile);
      si.setValidationStringency(validationStringency);
      it = si;
    } catch (IOException e) {
      throw new RuntimeEOFException(e);
View Full Code Here

Examples of net.sourceforge.jiu.util.SeekableByteArrayOutputStream.seek()

    }
    else
    if (out instanceof SeekableByteArrayOutputStream)
    {
      SeekableByteArrayOutputStream sbaos = (SeekableByteArrayOutputStream)out;
      sbaos.seek((int)compressedDataOffset);
      sbaos.write((int)(compressedSize >> 8) & 0xff);
      sbaos.write((int)compressedSize & 0xff);
    }
  }
View Full Code Here

Examples of org.antlr.runtime.CharStream.seek()

                " token= [ "+ ((CommonToken)data.get(curr)).getStartIndex()
                + "-"+ ((CommonToken)data.get(curr)).getStopIndex() + "]" +
                data.get(curr).getText());
            data.subList(start, data.size()).clear();
            CharStream cs = ((Lexer)getTokenSource()).getCharStream();
            cs.seek(startToken.getStopIndex() + 1);
            log.info("reset cs pos:"+ (startToken.getStopIndex() + 1) );
            cs.setLine(startToken.getLine());
            cs.setCharPositionInLine(startToken.getCharPositionInLine() +
                (startToken.getStopIndex() + 1 - startToken.getStartIndex()));
        }
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.