Package org.globus.io.streams
Class GlobusFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.globus.io.streams.GlobusInputStream
-
- org.globus.io.streams.GlobusFileInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class GlobusFileInputStream extends GlobusInputStream
-
-
Constructor Summary
Constructors Constructor Description GlobusFileInputStream(String file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort()
Aborts transfer.int
available()
void
close()
long
getSize()
Returns the total size of input data.int
read()
int
read(byte[] msg)
int
read(byte[] buf, int off, int len)
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
GlobusFileInputStream
public GlobusFileInputStream(String file) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getSize
public long getSize()
Description copied from class:GlobusInputStream
Returns the total size of input data.- Overrides:
getSize
in classGlobusInputStream
- Returns:
- -1 if size is unknown.
-
abort
public void abort()
Description copied from class:GlobusInputStream
Aborts transfer. Usually makes sure to release all resources (sockets, file descriptors)
Does nothing by default.- Overrides:
abort
in classGlobusInputStream
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] msg) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] buf, int off, int len) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
public int read() throws IOException
- Overrides:
read
in classGlobusInputStream
- Throws:
IOException
-
available
public int available() throws IOException
- Overrides:
available
in classInputStream
- Throws:
IOException
-
-