Examples of mark()


Examples of com.google.dexmaker.Code.mark()

                    aBoxedResult);

            // This code is executed if proxy is null: call the original super method.
            // This is required to handle the case of construction of an object which leaks the
            // "this" pointer.
            code.mark(handlerNullCase);
            for (int i = 0; i < superArgs2.length; ++i) {
                superArgs2[i] = code.getParameter(i, argTypes[i]);
            }
            if (void.class.equals(returnType)) {
                code.invokeSuper(superMethod, null, localThis, superArgs2);
View Full Code Here

Examples of com.google.jstestdriver.token.BufferedTokenStream.mark()

 
  public void testReadMarkReset() throws Exception {
    BufferedTokenStream stream = new BufferedTokenStream(tokens.iterator());
    assertEquals(tokens.get(0), stream.read());
    assertEquals(tokens.get(1), stream.read());
    stream.mark();
    assertEquals(tokens.get(2), stream.read());
    assertEquals(tokens.get(3), stream.read());
    stream.reset();
    assertEquals(tokens.get(2), stream.read());
  }
View Full Code Here

Examples of com.intellij.lang.PsiBuilder.mark()

    protected ASTNode doParseContents(@NotNull ASTNode chameleon, @NotNull PsiElement psi) {
      final PsiBuilderFactory factory = PsiBuilderFactory.getInstance();
      final PsiBuilder psiBuilder = factory.createBuilder(getProject(), chameleon);
      final PsiBuilder builder = adapt_builder_(HaxeTokenTypes.EXPRESSION, psiBuilder, new HaxeParser());

      final PsiBuilder.Marker marker = builder.mark();
      enterErrorRecordingSection(builder, 0, _SECTION_GENERAL_, "<code fragment>");
      HaxeParser.expression(builder, 1);
      while (builder.getTokenType() != null) {
        builder.advanceLexer();
      }
View Full Code Here

Examples of com.jitlogic.zorka.common.util.TapInputStream.mark()

    @Test
    public void testTapInputStreamWithMarkAndReset() throws Exception {
        TapInputStream tis = new TapInputStream(new ByteArrayInputStream("ABCDEF".getBytes()));

        tis.read(new byte[2]); tis.mark(100);
        tis.read(new byte[2]); tis.reset();
        tis.read(new byte[3]);

        assertEquals("ABCDE", tis.asString());
    }
View Full Code Here

Examples of com.peterhi.obsolete.Data.mark()

      assertEquals(300, data.debug_GetRead());
      assertEquals(-1, data.debug_GetMark());
     
      assertEquals(false, data.reset());
     
      data.mark();
     
      assertEquals(100, data.readable());
      assertEquals(300, data.debug_GetRead());
      assertEquals(300, data.debug_GetMark());
     
View Full Code Here

Examples of com.peterhi.obsolete.Stream.mark()

  public void pMark_int() throws Exception {
    try {
      int whatever = 672695543;
      Stream stream = new Stream(sampleBytes());
      assertEquals(sampleBytes()[0], (byte )stream.read());
      stream.mark(whatever);
      assertEquals(sampleBytes()[1], (byte )stream.read());
      assertEquals(sampleBytes()[2], (byte )stream.read());
      stream.reset();
      assertEquals(sampleBytes()[1], (byte )stream.read());
      assertEquals(7, stream.available());
View Full Code Here

Examples of com.peterhi.runtime.Buffer.mark()

   
    // [011]00000 !
    withExistingData.skip(4);
   
    // [011]!00000 ==> SNAPSHOT marked as '!'
    withExistingData.mark();
   
    // [01]1!00000
    assertEquals(1, withExistingData.read());
   
    // [0]11!00000
View Full Code Here

Examples of com.slytechs.utils.memory.channel.BufferedReadableByteChannel.mark()

     * Wrap the original input in buffer channel so that we can rewind and check
     * various types.
     */

    final BufferedReadableByteChannel b = new BufferedReadableByteChannel(in);
    b.mark(24); // Max number of bytes of all the known block headers

    if (PcapInputCapture.checkFormat(b) != null) {
      return FormatType.Pcap;
    }

View Full Code Here

Examples of com.sun.corba.se.impl.encoding.CDRInputObject.mark()

    protected String peekUserExceptionId(InputObject inputObject)
    {
        CDRInputObject cdrInputObject = (CDRInputObject) inputObject;
        // REVISIT - need interface for mark/reset
        cdrInputObject.mark(Integer.MAX_VALUE);
        String result = cdrInputObject.read_string();
        cdrInputObject.reset();
        return result;
    }
View Full Code Here

Examples of com.volantis.map.common.streams.SeekableInputStream.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
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.