Examples of markSupported()


Examples of com.fasterxml.jackson.core.io.MergedStream.markSupported()

        MergedStream ms = new MergedStream(ctxt, new ByteArrayInputStream(second),
                                           first, 99, 99+5);
        // Ok, first, should have 5 bytes from first buffer:
        assertEquals(5, ms.available());
        // not supported when there's buffered stuff...
        assertFalse(ms.markSupported());
        // so this won't work, but shouldn't throw exception
        ms.mark(1);
        assertEquals((byte) 'A', ms.read());
        assertEquals(3, ms.skip(3));
        byte[] buffer = new byte[5];

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

 
  @Test
  public void pMarkSupported_void() throws Exception {
    try {
      Stream stream = new Stream();
      assertEquals(true, stream.markSupported());
    } finally {
    }
  }
 
  @Test

Examples of com.starlight.io.PositionTrackingInputStream.markSupported()

          // If we weren't able to skip the desired number of bytes, we'll need
          // to do a full index because we don't know what line we're at.
          if ( actual != starting_position ) {
            // If mark is support, we can just reset to the beginning and
            // go on
            if ( in.markSupported() ) {
              in.reset(); // pop to beginning (no mark set)

              // Indicate that we're starting a full index
              //noinspection unchecked
              listeners.dispatch().indexingStarting( attachment, true );

Examples of java.io.BufferedInputStream.markSupported()

        DataObject unmaThingy = new DataObject();
        unmaThingy.type = stream.readChar();
        unmaThingy.time = stream.readLong();
       
        assertTrue( "Mark/reset is not supported", bis.markSupported() );
        bis.mark(8);
        int [] intBytes = new int [4];
        intBytes[0] = bis.read();
        intBytes[1] = bis.read();
        intBytes[2] = bis.read();

Examples of java.io.ByteArrayInputStream.markSupported()

  @Test
  public void testMarkSupported() throws IOException
  {
    InputStream data = new ByteArrayInputStream(DATA);
    CountingInputStream in = new CountingInputStream(data);
    assertEquals(data.markSupported(), in.markSupported());
  }

  @Test
  public void testMarkAndReset() throws IOException
  {

Examples of java.io.ByteArrayInputStream.markSupported()

     */
    public void test_markSupported() {
        InputStream is = new ByteArrayInputStream(new byte[10]);
        InflaterInputStream iis = new InflaterInputStream(is);
        assertFalse(iis.markSupported());
        assertTrue(is.markSupported());
    }

  /**
     * @tests java.util.zip.InflaterInputStream#read()
     */
 

Examples of java.io.ByteArrayInputStream.markSupported()

  @Test
  public void testMarkSupported() throws IOException
  {
    InputStream data = new ByteArrayInputStream(DATA);
    InputStream in = new LimitInputStream(data, 10);
    assertEquals(data.markSupported(), in.markSupported());
  }

  @Test
  public void testMarkAndReset() throws IOException
  {

Examples of java.io.DataInputStream.markSupported()

    public SpoofData(final InputStream is) throws java.io.IOException {
      // Seek past the ICU data header.
      // TODO: verify that the header looks good.
      DataInputStream dis = new DataInputStream(new BufferedInputStream(is));
      dis.skip(0x80);
      assert (dis.markSupported());
      dis.mark(Integer.MAX_VALUE);

      fRawData = new SpoofDataHeader(dis);
      initPtrs(dis);
    }

Examples of java.io.FileInputStream.markSupported()

     * @throws Throwable
     */
    public void load(String fileName) throws Throwable {
        ExcelDataParser parser = null;
        InputStream inp = new FileInputStream(fileName);
        if (!inp.markSupported())
            inp = new PushbackInputStream(inp, 8);
        if (POIFSFileSystem.hasPOIFSHeader(inp)) {
            parser = new HSSFParser(this);
        } else if (POIXMLDocument.hasOOXMLHeader(inp)) {
            parser = new XSSFParser(this);

Examples of java.io.InputStream.markSupported()

                response.commit();

                if (response.getKeepAlive()) {
                    InputStream is = request.getRawInputStream();
                    if (is != null && is.markSupported()) {
                        is.mark(4);
                        if (is.read() != '\r' || is.read() != '\n')
                            is.reset();
                    }
                } else
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.