Package java.io

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


  public static void main(String[] args) throws Exception {

    // create a stream which can be reset, enclose it in a buffered stream which supports reseting
    InputStream in = new FileInputStream("annotation.conf");

    System.out.println("Is mark supported: " + in.markSupported());

    in = new BufferedInputStream(in);

    System.out.println("Is mark supported: " + in.markSupported());
View Full Code Here

    System.out.println("Is mark supported: " + in.markSupported());

    in = new BufferedInputStream(in);

    System.out.println("Is mark supported: " + in.markSupported());

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

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