Examples of mark()


Examples of org.apache.lucene.analysis.CharFilter.mark()

  };
 
  public void testWrapping() throws Exception {
    CharFilter cs = new TestRandomChains.CheckThatYouDidntReadAnythingReaderWrapper(wrappedStream);
    try {
      cs.mark(1);
      fail();
    } catch (Exception e) {
      assertEquals("mark(int)", e.getMessage());
    }
   
View Full Code Here

Examples of org.apache.lucene.analysis.CharStream.mark()

  };
 
  public void testWrapping() throws Exception {
    CharStream cs = new TestRandomChains.CheckThatYouDidntReadAnythingReaderWrapper(wrappedStream);
    try {
      cs.mark(1);
      fail();
    } catch (Exception e) {
      assertEquals("mark(int)", e.getMessage());
    }
   
View Full Code Here

Examples of org.apache.lucene.util.UnsafeByteArrayInputStream.mark()

    int markIndex = 3;
    // Advance the index
    for (int i = 0; i < markIndex; i++) {
      ubais.read();
    }
    ubais.mark(markIndex);
    for (int i = markIndex; i < bytes.length; i++) {
      ubais.read();
    }
    ubais.reset();
    assertEquals(bytes.length - markIndex, ubais.available());
View Full Code Here

Examples of org.apache.mina.common.ByteBuffer.mark()

                    int byteCount = 1;
                    Object messageCopy = message;
                    if (message instanceof ByteBuffer) {
                        ByteBuffer rb = (ByteBuffer) message;
                        rb.mark();
                        byteCount = rb.remaining();
                        ByteBuffer wb = ByteBuffer.allocate(rb.remaining());
                        wb.put(rb);
                        wb.flip();
                        rb.reset();
View Full Code Here

Examples of org.apache.mina.common.IoBuffer.mark()

        private Object getMessageCopy(Object message) {
            Object messageCopy = message;
            if (message instanceof IoBuffer) {
                IoBuffer rb = (IoBuffer) message;
                rb.mark();
                IoBuffer wb = IoBuffer.allocate(rb.remaining());
                wb.put(rb);
                wb.flip();
                rb.reset();
                messageCopy = wb;
View Full Code Here

Examples of org.apache.mina.core.buffer.IoBuffer.mark()

        buf.put((byte) 0);
        buf.put((byte) 0);
        buf.put((byte) 0);

        // Position should be 3 when we reset this buffer.
        buf.mark();

        // Overflow it
        buf.put((byte) 0);
        buf.put((byte) 0);
View Full Code Here

Examples of org.apache.tika.io.TikaInputStream.mark()

        if (tis != null) {
            try {
                if (tis.hasFile()) {
                    Font.createFont(Font.TRUETYPE_FONT, tis.getFile());
                } else {
                    tis.mark(0);
                    Font.createFont(Font.TRUETYPE_FONT, stream);
                    tis.reset();
                }
            } catch (FontFormatException ex) {
                throw new TikaException("Bad TrueType font.");
View Full Code Here

Examples of org.archive.wayback.core.Resource.mark()

    if(!wbRequest.isFrameWrapperContext()) {
      // in case this is an HTML page with FRAMEs, peek ahead an look:
      // TODO: make ThreadLocal:
      byte buffer[] = new byte[FRAMESET_SCAN_BUFFER_SIZE];

      decodedResource.mark(FRAMESET_SCAN_BUFFER_SIZE);
      int amtRead = decodedResource.read(buffer);
      decodedResource.reset();

      if(amtRead > 0) {
        StringBuilder foo = new StringBuilder(new String(buffer,charSet));
View Full Code Here

Examples of org.auraframework.util.LimitedLengthInputStream.mark()

    public void testMarkingUnsupported() throws Exception {
        InputStream in = new LimitedLengthInputStream(createTestStream(10), 5, new TestStreamFinishedListener());
        try {
            // Nothing should happen
            in.mark(3);
            in.mark(0);
            in.mark(Integer.MIN_VALUE);
            in.mark(Integer.MAX_VALUE);

            // Ensure that mark is unsupported (apologies to anyone named Mark)
View Full Code Here

Examples of org.emftrace.quarc.ui.zest.nodes.GSSElementGraphNode.mark()

          if (((Graph) e.widget).getSelection().get(i) instanceof GSSElementGraphNode) {
            GSSElementGraphNode selectedNode = (GSSElementGraphNode) ((Graph) e.widget)
                .getSelection().get(i);

            selectedNode.highlight();
            selectedNode.mark();
            selectedNode.markChildren();
            selectedNode.markParents();
          }
      }
    });
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.