Examples of mark()


Examples of javax.imageio.stream.ImageInputStream.mark()

        ByteArrayOutputStream iccStream = null;

        Source src = session.needSource(info.getOriginalURI());
        ImageInputStream in = ImageUtil.needImageInputStream(src);
        JPEGFile jpeg = new JPEGFile(in);
        in.mark();
        try {
            outer:
            while (true) {
                int reclen;
                int segID = jpeg.readMarkerSegment();
View Full Code Here

Examples of javax.imageio.stream.ImageOutputStream.mark()

            final Context octx = (Context)ctx;
            final ImageOutputStream ios = octx.outputStream;
            final int length = octx.length;
            int pos = 0;
            try {
                ios.mark();
                do {
                    if (pos >= length) {
                        ios.reset();
                        ios.mark();
                        pos = 0;
View Full Code Here

Examples of javax.imageio.stream.MemoryCacheImageInputStream.mark()

        i = new MemoryCacheImageInputStream(bs);

        // Test mark() and reset().
        i.seek(17);
        h.check(i.getStreamPosition() == 17);
        i.mark();
        i.seek(49);
        h.check(i.getStreamPosition() == 49);
        i.reset();
        h.check(i.getStreamPosition() == 17);
View Full Code Here

Examples of javax.servlet.ServletInputStream.mark()

    private Properties getProperties(HttpServletRequest request) throws IOException {
        Properties props = new Properties();
        ServletInputStream xmlStream = request == null ? null : request.getInputStream();
        if (xmlStream != null) {
            if (xmlStream.markSupported()) {
                xmlStream.mark(XML_DEBUG_LEN); // mark up to debug len
            }
            props.load(xmlStream);
        }
        return props;
    }
View Full Code Here

Examples of javax.sound.sampled.AudioInputStream.mark()

        assertEquals(10, ais.getFrameLength());
        assertEquals(40, ais.available());
        assertEquals(8, ais.read(new byte[10]));
        assertEquals(32, ais.available());
        assertTrue(ais.markSupported());
        ais.mark(1000);
        assertEquals(8, ais.read(new byte[10]));
        assertEquals(24, ais.available());
        assertEquals(0, ais.skip(2));
        assertEquals(8, ais.skip(10));
        ais.reset();
View Full Code Here

Examples of net.charabia.util.io.BinaryInputStream.mark()

  InputStream istream = new FileInputStream(f);
        BufferedInputStream buffin = new BufferedInputStream(istream);
  BinaryInputStream in = new BinaryInputStream(buffin);

  try {
      in.mark(1024 * 1024);

      IconDir dir = new IconDir(in);
      //      System.out.println("DIR = " + dir);

      IconEntry[] entries = new IconEntry[dir.idCount];
View Full Code Here

Examples of net.rubyeye.xmemcached.buffer.IoBuffer.mark()

    buffer.put("test".getBytes());
    assertEquals(64, buffer.capacity());
    assertEquals(4, buffer.position());
    assertEquals(64, buffer.limit());
    assertEquals(60, buffer.remaining());
    buffer.mark();

    buffer.position(32);
    assertEquals(32, buffer.position());
    buffer.reset();
    assertEquals(4, buffer.position());
View Full Code Here

Examples of net.sf.cglib.core.CodeEmitter.mark()

/*  95 */     e.invoke_interface(ENABLED, ENABLED_GET);
/*  96 */     Label intercept = e.make_label();
/*  97 */     e.ifnonnull(intercept);
/*  98 */     e.return_value();
/*     */
/* 100 */     e.mark(intercept);
/* 101 */     Local result = e.make_local(type);
/* 102 */     e.store_local(result);
/* 103 */     e.load_this();
/* 104 */     e.invoke_interface(ENABLED, ENABLED_GET);
/* 105 */     e.load_this();
View Full Code Here

Examples of org.antlr.v4.runtime.CharStream.mark()

   * {@link IllegalStateException}.
   */
  @Test(expected = IllegalStateException.class)
  public void testMarkReleaseOutOfOrder() {
    CharStream input = createStream("");
    int m1 = input.mark();
    int m2 = input.mark();
    input.release(m1);
  }

  /**
 
View Full Code Here

Examples of org.apache.aries.util.io.RememberingInputStream.mark()

    try {
      //Buffer the InputStream so we can mark it, though we'll be in
      //trouble if we have to read more than 8192 characters before finding
      //the schema!
      is = new RememberingInputStream(descriptor.getInputStream());
      is.mark(Integer.MAX_VALUE);
      SAXParser parser = parserFactory.newSAXParser();
      try{
        parser.parse(is, new SchemaLocatingHandler());
      } catch (EarlyParserReturn epr) {
        //This is not really an exception, but a way to work out which
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.