Package org.fedoraproject.javadeptools
Class ProgressFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.fedoraproject.javadeptools.ProgressFileInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
class ProgressFileInputStream extends java.io.FilterInputStream
-
-
Field Summary
Fields Modifier and Type Field Description private int
lastLength
private long
lastTime
private long
pos
private long
size
private static long
TIME_GRANULARITY
-
Constructor Summary
Constructors Constructor Description ProgressFileInputStream(java.io.File f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
appendMessage(java.lang.String msg)
void
close()
int
read()
int
read(byte[] b, int off, int len)
private void
updateProgress(int cnt)
-
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, reset, skip
-
-
-
-
Field Detail
-
size
private final long size
-
pos
private long pos
-
TIME_GRANULARITY
private static final long TIME_GRANULARITY
- See Also:
- Constant Field Values
-
lastTime
private long lastTime
-
lastLength
private int lastLength
-
-
Method Detail
-
read
public int read() throws java.io.IOException
- Overrides:
read
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
updateProgress
private void updateProgress(int cnt)
-
appendMessage
private void appendMessage(java.lang.String msg)
-
-