Package org.aspectj.util
Klasse FileUtil.Pipe
java.lang.Object
org.aspectj.util.FileUtil.Pipe
- Alle implementierten Schnittstellen:
Runnable
- Umschließende Klasse:
FileUtil
A pipe when run reads from an input stream to an output stream, optionally sleeping between reads.
- Siehe auch:
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected void
completing
(long totalWritten, Throwable thrown) This is called when the pipe is completing.boolean
halt
(boolean wait, boolean finishStream) Tell the pipe to halt the next time it gains control.void
run()
Run the pipe.void
setSnoop
(ByteArrayOutputStream snoop) long
-
Methodendetails
-
setSnoop
-
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. -
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 donefinishStream
- 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
- Gibt zurück:
- any exception thrown when reading/writing
-
completing
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.
-