Module com.github.rvesse.airline.io
Class OutputStreamControlTracker<T>
- java.lang.Object
-
- com.github.rvesse.airline.io.ControlTracker<T>
-
- com.github.rvesse.airline.io.output.OutputStreamControlTracker<T>
-
public class OutputStreamControlTracker<T> extends ControlTracker<T>
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.charset.Charsetcharsetprivate java.io.OutputStreamoutput-
Fields inherited from class com.github.rvesse.airline.io.ControlTracker
provider
-
-
Constructor Summary
Constructors Constructor Description OutputStreamControlTracker(java.io.OutputStream output, ControlCodeSource<T> provider)OutputStreamControlTracker(java.io.OutputStream output, java.nio.charset.Charset charset, ControlCodeSource<T> provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyInternal(T value)Method that derived classes must implement to add the actual logic for applying the control to the streamprivate byte[]getBytes(java.lang.String code)protected voidresetInternal(T value)Method that derived classes must implement to add the actual logic for resetting the control against the stream-
Methods inherited from class com.github.rvesse.airline.io.ControlTracker
apply, reset, set
-
-
-
-
Constructor Detail
-
OutputStreamControlTracker
public OutputStreamControlTracker(java.io.OutputStream output, ControlCodeSource<T> provider)
-
OutputStreamControlTracker
public OutputStreamControlTracker(java.io.OutputStream output, java.nio.charset.Charset charset, ControlCodeSource<T> provider)
-
-
Method Detail
-
resetInternal
protected void resetInternal(T value) throws java.io.IOException
Description copied from class:ControlTrackerMethod that derived classes must implement to add the actual logic for resetting the control against the stream- Specified by:
resetInternalin classControlTracker<T>- Parameters:
value- Value to be reset from- Throws:
java.io.IOException
-
getBytes
private byte[] getBytes(java.lang.String code)
-
applyInternal
protected void applyInternal(T value) throws java.io.IOException
Description copied from class:ControlTrackerMethod that derived classes must implement to add the actual logic for applying the control to the stream- Specified by:
applyInternalin classControlTracker<T>- Parameters:
value- Value to be applied- Throws:
java.io.IOException
-
-