Java BufferedInputStream Create inputStreamBuffered(final File file)

Here you can find the source of inputStreamBuffered(final File file)

Description

Open a buffered InputStream , equivalent to:
new BufferedInputStream(new FileInputStream(file));

License

Open Source License

Parameter

Parameter Description
file the file to open

Exception

Parameter Description
FileNotFoundException if the file could not be opened

Return

the buffered input stream from the file

Declaration

public static final BufferedInputStream inputStreamBuffered(final File file) throws FileNotFoundException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.BufferedInputStream;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class Main {
    /** Open a buffered {@link InputStream}, equivalent to:<br/>
     * {@code new BufferedInputStream(new FileInputStream(file));}
     * @param file the file to open// ww  w . ja  v  a  2 s .  c  o  m
     * @return the buffered input stream from the file
     * @throws FileNotFoundException if the file could not be opened
     */
    public static final BufferedInputStream inputStreamBuffered(final File file) throws FileNotFoundException {
        BufferedInputStream input = new BufferedInputStream(new FileInputStream(file));
        return input;
    }
}

Related

  1. getStream(String name)
  2. getStream(String resource)
  3. getStream(String string)
  4. getStream(String string, String codePage)
  5. getStreamFromString(String text)
  6. toBufferedInputStream(InputStream inputStream)
  7. toBufferedInputStream(InputStream stream)