Fluxos de Datos (Streams)

De Wiki do Ciclo ASIR do IES de Rodeira
Saltar á navegación Saltar á procura

Concepto de Fluxo de Datos

Secuencia de datos que se envían (de saída) ou se reciben (entrada)


A clase Stream

  • Autocloseable --> try with resources

Collection stream() Stream.of ... etc

IntStream LongStream DoubleStream

Serialización e a interface Serializable

InputStream/OutputStream e Reader/Writer

  • InputStream/OutputStream son orientadas a byte
  • Reader/Writer orientadas a caracteres UTF8

As clases InputStream/OutputStream

ByteArrayInputStream/ByteArrayOutputStream FileInputStream/FileOutputStream FilterInputStream/FilterOutputStream

   - BufferedInputStream/BufferedOutputStream
   - DataInputStream/DataOutputStream

ObjectInputStream/ObjectOutputStream PipedInputStream/PipedOutputStream StringBufferInputStream PrintStream AudioInputStream

 -- AudioSystem - Clip


As clases Reader/Writer

BufferedReader/BufferedWriter

  - LineNumberReader

CharArrayReader/CharArrayWriter FilterReader/FilterWriter

  - FileReader/FileWriter

PipedReader/PipedWriter StringReader/StringWriter PrintWriter