Class SftpFileTransferProgressOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.apache.sshd.cli.client.helper.SftpFileTransferProgressOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class SftpFileTransferProgressOutputStream extends java.io.FilterOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description private longbyteCountprivate intcurMarkersInLinestatic intDEFAULT_MARKER_SIZEstatic intDEFAULT_MARKS_PER_LINEstatic charDEFAULT_PROGRESS_CHARprivate longlastMarkOffsetprivate charmarkerCharprivate intmarkerSizeprivate intmarkersPerLineprivate java.lang.Appendablestdoutprivate byte[]workBuf
-
Constructor Summary
Constructors Constructor Description SftpFileTransferProgressOutputStream(java.io.OutputStream out, int markerSize, char markerChar, int markersPerLine, java.lang.Appendable stdout)SftpFileTransferProgressOutputStream(java.io.OutputStream out, java.lang.Appendable stdout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendMarkers(int markersCount)chargetMarkerChar()intgetMarkerSize()intgetMarkersPerLine()java.lang.AppendablegetStdout()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)
-
-
-
Field Detail
-
DEFAULT_PROGRESS_CHAR
public static final char DEFAULT_PROGRESS_CHAR
- See Also:
- Constant Field Values
-
DEFAULT_MARKS_PER_LINE
public static final int DEFAULT_MARKS_PER_LINE
- See Also:
- Constant Field Values
-
DEFAULT_MARKER_SIZE
public static final int DEFAULT_MARKER_SIZE
- See Also:
- Constant Field Values
-
markerSize
private final int markerSize
-
markerChar
private final char markerChar
-
markersPerLine
private final int markersPerLine
-
stdout
private final java.lang.Appendable stdout
-
workBuf
private final byte[] workBuf
-
byteCount
private long byteCount
-
lastMarkOffset
private long lastMarkOffset
-
curMarkersInLine
private int curMarkersInLine
-
-
Constructor Detail
-
SftpFileTransferProgressOutputStream
public SftpFileTransferProgressOutputStream(java.io.OutputStream out, java.lang.Appendable stdout)
-
SftpFileTransferProgressOutputStream
public SftpFileTransferProgressOutputStream(java.io.OutputStream out, int markerSize, char markerChar, int markersPerLine, java.lang.Appendable stdout)
-
-
Method Detail
-
getMarkerSize
public int getMarkerSize()
-
getMarkerChar
public char getMarkerChar()
-
getMarkersPerLine
public int getMarkersPerLine()
-
getStdout
public java.lang.Appendable getStdout()
-
write
public void write(int b) throws java.io.IOException- Overrides:
writein classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] b) throws java.io.IOException- Overrides:
writein classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException- Overrides:
writein classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
appendMarkers
protected void appendMarkers(int markersCount) throws java.io.IOException- Throws:
java.io.IOException
-
-