Package java.io

Examples of java.io.FileInputStream.reset()


            } else if (fileName.endsWith(".bz2")) {
                InputStream is = new FileInputStream(file);
                is.mark(4);
                if (!(is.read() == 'B' && is.read() == 'Z')) {
                    // No BZ prefix as appended by command line tools.  Reset and hope for the best
                    is.reset();
                }
                return new CBZip2InputStream(is);
            }
        } catch (IOException e) {
            logger.warn("Something that looked like a compressed file gave an error on open: "+file,e);
View Full Code Here


    // 2 GB limit
    in.mark(4096);

    in.read();

    in.reset();

    // the mark support can be used to test if reseting is supported, we shoudl use this test anyway
    // to fail gracefully in the cross validators ...

  }
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.