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.lang

Class ProcessBuilder.Redirect

  • Enclosing class:
    ProcessBuilder

    public abstract static class ProcessBuilder.Redirect
    extends Object
    Represents a source of subprocess input or a destination of subprocess output. Each Redirect instance is one of the following:

    Each of the above categories has an associated unique Type.

    Since:
    1.7
    • Field Detail

      • PIPE

        public static final ProcessBuilder.Redirect PIPE
        Indicates that subprocess I/O will be connected to the current Java process over a pipe. This is the default handling of subprocess standard I/O.

        It will always be true that

         Redirect.PIPE.file() == null &&
         Redirect.PIPE.type() == Redirect.Type.PIPE
         
      • INHERIT

        public static final ProcessBuilder.Redirect INHERIT
        Indicates that subprocess I/O source or destination will be the same as those of the current process. This is the normal behavior of most operating system command interpreters (shells).

        It will always be true that

         Redirect.INHERIT.file() == null &&
         Redirect.INHERIT.type() == Redirect.Type.INHERIT
         
    • Method Detail

      • file

        public File file()
        Returns the File source or destination associated with this redirect, or null if there is no such file.
        Returns:
        the file associated with this redirect, or null if there is no such file
      • from

        public static ProcessBuilder.Redirect from(File file)
        Returns a redirect to read from the specified file.

        It will always be true that

         Redirect.from(file).file() == file &&
         Redirect.from(file).type() == Redirect.Type.READ
         
        Returns:
        a redirect to read from the specified file
        Throws:
        NullPointerException - if the specified file is null
      • to

        public static ProcessBuilder.Redirect to(File file)
        Returns a redirect to write to the specified file. If the specified file exists when the subprocess is started, its previous contents will be discarded.

        It will always be true that

         Redirect.to(file).file() == file &&
         Redirect.to(file).type() == Redirect.Type.WRITE
         
        Returns:
        a redirect to write to the specified file
        Throws:
        NullPointerException - if the specified file is null
      • appendTo

        public static ProcessBuilder.Redirect appendTo(File file)
        Returns a redirect to append to the specified file. Each write operation first advances the position to the end of the file and then writes the requested data. Whether the advancement of the position and the writing of the data are done in a single atomic operation is system-dependent and therefore unspecified.

        It will always be true that

         Redirect.appendTo(file).file() == file &&
         Redirect.appendTo(file).type() == Redirect.Type.APPEND
         
        Returns:
        a redirect to append to the specified file
        Throws:
        NullPointerException - if the specified file is null
      • equals

        public boolean equals(Object obj)
        Compares the specified object with this Redirect for equality. Returns true if and only if the two objects are identical or both objects are Redirect instances of the same type associated with non-null equal File instances.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
        See Also:
        Object.hashCode(), HashMap

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/lang/processbuilder.redirect.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