Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
java.io

Class PipedOutputStream

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

    public class PipedOutputStream
    extends OutputStream
    A piped output stream can be connected to a piped input stream to create a communications pipe. The piped output stream is the sending end of the pipe. Typically, data is written to a PipedOutputStream object by one thread and data is read from the connected PipedInputStream by some other thread. Attempting to use both objects from a single thread is not recommended as it may deadlock the thread. The pipe is said to be broken if a thread that was reading data bytes from the connected piped input stream is no longer alive.
    Since:
    JDK1.0
    See Also:
    PipedInputStream
    • Constructor Detail
      • PipedOutputStream
        public PipedOutputStream(PipedInputStream snk)
                          throws IOException
        Creates a piped output stream connected to the specified piped input stream. Data bytes written to this stream will then be available as input from snk.
        Parameters:
        snk - The piped input stream to connect to.
        Throws:
        IOException - if an I/O error occurs.
    • Method Detail
      • connect
        public void connect(PipedInputStream snk)
                     throws IOException
        Connects this piped output stream to a receiver. If this object is already connected to some other piped input stream, an IOException is thrown.

        If snk is an unconnected piped input stream and src is an unconnected piped output stream, they may be connected by either the call:

         src.connect(snk)
        or the call:
         snk.connect(src)
        The two calls have the same effect.
        Parameters:
        snk - the piped input stream to connect to.
        Throws:
        IOException - if an I/O error occurs.
      • write
        public void write(int b)
                   throws IOException
        Writes the specified byte to the piped output stream.

        Implements the write method of OutputStream.

        Specified by:
        write in class OutputStream
        Parameters:
        b - the byte to be written.
        Throws:
        IOException - if the pipe is broken, unconnected, closed, or if an I/O error occurs.
      • write
        public void write(byte[] b,
                 int off,
                 int len)
                   throws IOException
        Writes len bytes from the specified byte array starting at offset off to this piped output stream. This method blocks until all the bytes are written to the output stream.
        Overrides:
        write in class OutputStream
        Parameters:
        b - the data.
        off - the start offset in the data.
        len - the number of bytes to write.
        Throws:
        IOException - if the pipe is broken, unconnected, closed, or if an I/O error occurs.
      • flush
        public void flush()
                   throws IOException
        Flushes this output stream and forces any buffered output bytes to be written out. This will notify any readers that bytes are waiting in the pipe.
        Specified by:
        flush in interface Flushable
        Overrides:
        flush in class OutputStream
        Throws:
        IOException - if an I/O error occurs.
      • close
        public void close()
                   throws IOException
        Closes this piped output stream and releases any system resources associated with this stream. This stream may no longer be used for writing bytes.
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface AutoCloseable
        Overrides:
        close in class OutputStream
        Throws:
        IOException - if an I/O error occurs.

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-java/io/PipedOutputStream.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut