Groovy Documentation

org.hidetake.gradle.ssh.internal.command
[Groovy] Class LineOutputStream

java.lang.Object
  java.io.OutputStream
      org.hidetake.gradle.ssh.internal.command.LineOutputStream

@TupleConstructor
@Slf4j
class LineOutputStream
extends java.io.OutputStream

An implementation of line oriented java.io.OutputStream.

Authors:
hidetake.org


Property Summary
java.lang.String charset

java.util.List lineListeners

Listeners for line processing.

java.util.List loggingListeners

Listeners for logging output.

java.util.List partialListeners

Listeners for partial matching to the line buffer.

 
Method Summary
void close()

void flush()

Flush the buffer.

void write(int b)

 
Methods inherited from class java.io.OutputStream
java.io.OutputStream#write([B, int, int), java.io.OutputStream#write([B), java.io.OutputStream#write(int), java.io.OutputStream#flush(), java.io.OutputStream#close(), java.io.OutputStream#wait(long, int), java.io.OutputStream#wait(long), java.io.OutputStream#wait(), java.io.OutputStream#equals(java.lang.Object), java.io.OutputStream#toString(), java.io.OutputStream#hashCode(), java.io.OutputStream#getClass(), java.io.OutputStream#notify(), java.io.OutputStream#notifyAll()
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

charset

final java.lang.String charset


lineListeners

final java.util.List lineListeners
Listeners for line processing. Called when the stream received a line. The stream must call this when received an new-line character or closed.


loggingListeners

final java.util.List loggingListeners
Listeners for logging output. Called when the stream received a line or at least one of partial listeners returned true.


partialListeners

final java.util.List partialListeners
Listeners for partial matching to the line buffer. Called when the stream is flushed. This method may be called several times until the stream receives a complete line. If at least one of closures returned true, line buffer will be cleared and logging listeners (see below) will be called. Otherwise, it will be preserved until new-line appears.


 
Method Detail

close

void close()


flush

void flush()
Flush the buffer. This method may be called regardless of line separators, so it saves last block and write it in the next chance.


write

void write(int b)


 

Groovy Documentation