Package nom.tam.fits.compress
Class CloseIS
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- nom.tam.fits.compress.CloseIS
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class CloseIS extends java.io.FilterInputStream
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Thread
copier
private static int
COPY_BUFFER_SIZE
private java.lang.String
errorText
private java.io.IOException
exception
private java.io.OutputStream
input
private static java.util.logging.Logger
LOG
private java.io.InputStream
output
private java.lang.Process
proc
private java.lang.Thread
stdError
-
Constructor Summary
Constructors Constructor Description CloseIS(java.lang.Process proc, java.io.InputStream compressed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private void
handledOccuredException(int result)
int
read()
int
read(byte[] b, int off, int len)
private void
start()
start all threads.-
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, reset, skip
-
-
-
-
Field Detail
-
LOG
private static final java.util.logging.Logger LOG
-
COPY_BUFFER_SIZE
private static final int COPY_BUFFER_SIZE
- See Also:
- Constant Field Values
-
output
private java.io.InputStream output
-
input
private java.io.OutputStream input
-
errorText
private java.lang.String errorText
-
exception
private java.io.IOException exception
-
stdError
private final java.lang.Thread stdError
-
copier
private final java.lang.Thread copier
-
proc
private final java.lang.Process proc
-
-
Method Detail
-
start
private void start()
start all threads.
-
read
public int read() throws java.io.IOException
- Overrides:
read
in classjava.io.FilterInputStream
- Throws:
java.io.IOException
-
handledOccuredException
private void handledOccuredException(int result) throws java.io.IOException
- 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
-
-