wpjr2’s Weblog

Artigos e tutoriais úteis

Resumo dos Fluxos de Dados em Java (2)

Posted by wpjr2 em maio 3, 2008

Type of I/O Streams Description
Memory CharArrayReader
CharArrayWriter
ByteArrayInputStream
ByteArrayOutputStream
Read from and write to memory. Create on an existing array and then use the read and write methods to read from or write to the array.
Memory StringReader
StringWriter
StringBufferInputStream
top>StringReader reads characters from a String in memory.StringWriter writes to a String, collecting characters written to it in a StringBuffer, which can then be converted to a String.StringBufferInputStream is similar to StringReader, except that it reads bytes from a StringBuffer.
Pipe PipedReader
PipedWriter
PipedInputStream
PipedOutputStream
Implement the input and output components of a pipe. Pipes are used to channel the output from one thread into the input of another.
File FileReader
FileWriter
FileInputStream
FileOutputStream
Collectively called file streams, these streams are used to read from or write to a file on the native file system.
Concatenation N/A
SequenceInputStream
Concatenates multiple input streams into one input stream.
Object Serialization N/A
ObjectInputStream
ObjectOutputStream
Used to serialize objects.
Data
Conversion
N/A
DataInputStream
DataOutputStream
Read or write primitive data types in a machine-independent format.
Counting LineNumberReader
LineNumberInputStream
Keeps track of line numbers while reading.
Peeking Ahead PushbackReader
PushbackInputStream
These input streams each have a pushback buffer. When reading data from a stream, it is sometimes useful to peek at the next few bytes or characters in the stream to decide what to do next.
Printing PrintWriter
PrintStream
Contain convenient printing methods. These are the easiest streams to write to, so you will often see other writable streams wrapped in one of these.
Buffering BufferedReader
BufferedWriter
BufferedInputStream
BufferedOutputStream
Buffer data while reading or writing, thereby reducing the number of accesses required on the original data source. Buffered streams are typically more efficient than similar nonbuffered streams and are often used with other streams.
Filters FilterReader
FilterWriter
FilterInputStream
FilterOutputStream
These abstract classes define the interface for filter streams, which filter data as it’s being read or written.
Convert InputStreamReader
OutputStreamWriter
Convert byte streams to character streams, and vice-versa.InputStreamReaders read bytes from InputStreams and convert them to characters. OutputStreamWriters convert characters to bytes and write to an OutputStream. Default character encodings are stored in System.getProperty(“file.encoding”).

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s

 
%d blogueiros gostam disto: