Examples of mark()


Examples of com.volantis.map.retriever.DefaultSeekableInputStream.mark()

                // the mimeDiscoverer should not effect the Seekable stream
                // and should restore its position but we mark it just in case.
                String mimeType = null;
                try {
                    seekableStream.mark();
                    mimeType = mimeDiscoverer.discoverMimeType(seekableStream);
                } finally {
                    seekableStream.reset();
                }
                responseInfo = new DefaultRepresentation(
View Full Code Here

Examples of com.yammer.metrics.core.MeterMetric.mark()

                return testHandler.queryHandler.handleQuery();
              }
            });

          } catch (Exception e) {
            errorMeter.mark();
          }

          synchronized (this) {
            try {
              this.wait(waitTime);
View Full Code Here

Examples of devplugin.Program.mark()

    }
    else if(mState == Program.WAS_UPDATED_STATE) {
      Program p = Plugin.getPluginManager().getProgram(getDate(), getID());

      if(p != null) {
        p.mark(marker);
      }
    }
  }

  /**
 
View Full Code Here

Examples of it.halfone.regex.Regex.mark()

          Regex rule;
          validRule = ((rule = parseToken(retVal, value, ruleMap)) != null);
          rule = rule.close();
          retVal = matcher.group(2);
          if (matcher.group(1) != null) {
            rule = rule.mark(retVal);
          }
          ruleMap.put(retVal, rule);
        }
      }
      if (validRule == false) {
View Full Code Here

Examples of java.io.BufferedInputStream.mark()

  public InputCapture<? extends CapturePacket> newInput(final File file,
      final Filter<ProtocolFilterTarget> filter) throws IOException {

    final BufferedInputStream b =
        new BufferedInputStream(new FileInputStream(file));
    b.mark(1024); // Buffer first 1K of stream so we can rewind

    /*
     * Check the stream, without decompression first
     */
    if (formatType(Channels.newChannel(b)) != null) {
View Full Code Here

Examples of java.io.BufferedInputStream.mark()

        long nextPos = 0;
        String chunkOfLastLine = null;
        int attemptCount = 0;
        String s = "";
        while (attemptCount < MAX_ATTEMPT_COUNT) {
            in.mark(FOUR_KB + (int) nextPos);
            if (nextPos > 0) {
                long skipped = in.skip(nextPos);
                if (skipped != nextPos) {
                    break;
                }
View Full Code Here

Examples of java.io.BufferedInputStream.mark()

        final Hashtable<String, Object> ht = new Hashtable<String, Object>();
        final BufferedInputStream in = new BufferedInputStream(is);
        try {
            if ( !extension.equals("config") ) {
                final Properties p = new Properties();
                in.mark(1);
                boolean isXml = in.read() == '<';
                in.reset();
                if (isXml) {
                    p.loadFromXML(in);
                } else {
View Full Code Here

Examples of java.io.BufferedInputStream.mark()

                    final Object key = i.nextElement();
                    ht.put(key.toString(), p.get(key));
                }
            } else {
                // check for initial comment line
                in.mark(256);
                final int firstChar = in.read();
                if ( firstChar == '#' ) {
                    int b;
                    while ((b = in.read()) != '\n' ) {
                        if ( b == -1 ) {
View Full Code Here

Examples of java.io.BufferedInputStream.mark()

    public static final int TEST_COMPRESSED_SIZE = 10 * 1024;
    private InputStream in;

    public TryInflaterInputStream(InputStream in) throws IOException {
        BufferedInputStream bufferedIn = new BufferedInputStream(in, TEST_COMPRESSED_SIZE);
        bufferedIn.mark(TEST_COMPRESSED_SIZE);
        try {
            InflaterInputStream testCompressedIn = new InflaterInputStream(bufferedIn);
            byte[] temp = new byte[TEST_COMPRESSED_SIZE / 10];
            testCompressedIn.read(temp);

View Full Code Here

Examples of java.io.BufferedReader.mark()

            get.getResponseBodyAsStream(), cs));
           
            char[] cbuf = new char[1];
            int read_idx = 1;
            do{
              rd.mark(read_idx++);
              if(rd.read(cbuf)==-1)
                break;
              if(cbuf[0]!='<')
                continue;
              rd.reset();
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.