Package java.io

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();
View Full Code Here


   
    // load the string builder
    mComment = new StringBuilder();
   
    // make sure that we have the mark/reset feature because I need it
    if (!bis.markSupported())
    {
      throw new IOException("Error: Mark/Read not supported.");
    }
   
    readHeader(bis);
View Full Code Here

   
    // load the string builder
    mComment = new StringBuilder();
   
    // make sure that we have the mark/reset feature because I need it
    if (!bis.markSupported())
    {
      throw new IOException("Error: Mark/Read not supported.");
    }
   
    readHeader(bis);
View Full Code Here

        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();
View Full Code Here

        ARCReader r = getSingleRecordReader("testArchiveRecordMarkSupport");
        ARCRecord record = getSingleRecord(r);
        record.setStrict(true);
        // ensure mark support
        InputStream stream = new BufferedInputStream(record);
        if (stream.markSupported()) {
            for (int i=0; i<3; i++) {
                this.readToEOS(stream);
                stream.mark(stream.available());
                stream.reset();
            }
View Full Code Here

    // Keep the Servlet input stream buffered in case the SOAP unmarshalling
    // fails, the SAX parsing will be able to retrieve the requestID even if
    // the XML is malmformed by resetting the input stream.
    BufferedInputStream is = new BufferedInputStream(req.getInputStream(),
                                                     65536);
    if ( is.markSupported() ) {
      is.mark(65536);
    }

    // Create response in the beginning as it might be used if the parsing
    // failes.
View Full Code Here

        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();
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.