Class SftpFileTransferProgressOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.sshd.cli.client.helper.SftpFileTransferProgressOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate intstatic final intstatic final intstatic final charprivate longprivate final charprivate final intprivate final intprivate final Appendableprivate final byte[]Fields inherited from class FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionSftpFileTransferProgressOutputStream(OutputStream out, int markerSize, char markerChar, int markersPerLine, Appendable stdout) SftpFileTransferProgressOutputStream(OutputStream out, Appendable stdout) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendMarkers(int markersCount) charintintvoidwrite(byte[] b) voidwrite(byte[] b, int off, int len) voidwrite(int b) Methods inherited from class FilterOutputStream
close, flush
-
Field Details
-
DEFAULT_PROGRESS_CHAR
public static final char DEFAULT_PROGRESS_CHAR- See Also:
-
DEFAULT_MARKS_PER_LINE
public static final int DEFAULT_MARKS_PER_LINE- See Also:
-
DEFAULT_MARKER_SIZE
public static final int DEFAULT_MARKER_SIZE- See Also:
-
markerSize
private final int markerSize -
markerChar
private final char markerChar -
markersPerLine
private final int markersPerLine -
stdout
-
workBuf
private final byte[] workBuf -
byteCount
private long byteCount -
lastMarkOffset
private long lastMarkOffset -
curMarkersInLine
private int curMarkersInLine
-
-
Constructor Details
-
SftpFileTransferProgressOutputStream
-
SftpFileTransferProgressOutputStream
public SftpFileTransferProgressOutputStream(OutputStream out, int markerSize, char markerChar, int markersPerLine, Appendable stdout)
-
-
Method Details
-
getMarkerSize
public int getMarkerSize() -
getMarkerChar
public char getMarkerChar() -
getMarkersPerLine
public int getMarkersPerLine() -
getStdout
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
appendMarkers
- Throws:
IOException
-