Klasse FileUtil.Pipe

java.lang.Object
org.aspectj.util.FileUtil.Pipe
Alle implementierten Schnittstellen:
Runnable
Umschließende Klasse:
FileUtil

public static class FileUtil.Pipe extends Object implements Runnable
A pipe when run reads from an input stream to an output stream, optionally sleeping between reads.
Siehe auch:
  • Methodendetails

    • setSnoop

      public void setSnoop(ByteArrayOutputStream snoop)
    • run

      public void run()
      Run the pipe. This halts on the first Throwable thrown or when a read returns -1 (for end-of-file) or on demand.
      Angegeben von:
      run in Schnittstelle Runnable
    • halt

      public boolean halt(boolean wait, boolean finishStream)
      Tell the pipe to halt the next time it gains control.
      Parameter:
      wait - if true, this waits synchronously until pipe is done
      finishStream - if true, then continue until a read from the input stream returns no bytes, then halt.
      Gibt zurück:
      true if run() will return the next time it gains control
    • totalWritten

      public long totalWritten()
      Gibt zurück:
      the total number of bytes written
    • getThrown

      public Throwable getThrown()
      Gibt zurück:
      any exception thrown when reading/writing
    • completing

      protected void completing(long totalWritten, Throwable thrown)
      This is called when the pipe is completing. This implementation does nothing. Subclasses implement this to get notice. Note that halt(true, true) might or might not have completed before this method is called.