“Bufferedinputstream” Código de respuesta

Java crea un bufferedinputstream

// Creates a FileInputStream
FileInputStream file = new FileInputStream(String path);

// Creates a BufferedInputStream
BufferedInputStream buffer = new BufferInputStream(file);
SAMER SAEID

Bufferedinputstream

try {
    // create a reader
    FileInputStream fis = new FileInputStream(new File("input.dat"));
    BufferedInputStream reader = new BufferedInputStream(fis);

    // read one byte at a time
    int ch;
    while ((ch = reader.read()) != -1) {
        System.out.print((char) ch);
    }

    // close the reader
    reader.close();

} catch (IOException ex) {
    ex.printStackTrace();
}
Wild Wolverine

Java crea un bufferedOutputStream

// Creates a FileOutputStream
FileOutputStream file = new FileOutputStream(String path);

// Creates a BufferedOutputStream
BufferedOutputStream buffer = new BufferOutputStream(file);
SAMER SAEID

Respuestas similares a “Bufferedinputstream”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código