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 long
byteCount
private int
curMarkersInLine
static int
DEFAULT_MARKER_SIZE
static int
DEFAULT_MARKS_PER_LINE
static char
DEFAULT_PROGRESS_CHAR
private long
lastMarkOffset
private char
markerChar
private int
markerSize
private int
markersPerLine
private java.lang.Appendable
stdout
private 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 void
appendMarkers(int markersCount)
char
getMarkerChar()
int
getMarkerSize()
int
getMarkersPerLine()
java.lang.Appendable
getStdout()
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(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:
write
in classjava.io.FilterOutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] b) throws java.io.IOException
- Overrides:
write
in classjava.io.FilterOutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
write
in classjava.io.FilterOutputStream
- Throws:
java.io.IOException
-
appendMarkers
protected void appendMarkers(int markersCount) throws java.io.IOException
- Throws:
java.io.IOException
-
-