uk.ac.starlink.astrogrid
Class AcrDataSource
java.lang.Object
uk.ac.starlink.util.DataSource
uk.ac.starlink.astrogrid.AcrDataSource
public class AcrDataSource
- extends DataSource
DataSource implementation which reads from MySpace using ACR.
- Since:
- 9 Sep 2005
- Author:
- Mark Taylor
Method Summary |
long |
getLength()
Returns the length of the stream returned by getInputStream
in bytes, if known. |
InputStream |
getRawInputStream()
Provides a new InputStream for this data source. |
Methods inherited from class uk.ac.starlink.util.DataSource |
close, forceCompression, getCompression, getHybridInputStream, getInputStream, getInputStream, getIntro, getIntroLimit, getMarkWorkaround, getName, getPosition, getRawLength, getSystemId, getURL, makeDataSource, makeDataSource, setCompression, setIntroLimit, setMarkWorkaround, setName, setPosition, toString |
AcrDataSource
public AcrDataSource(AcrConnection connection,
String uri)
- Constructor.
- Parameters:
connection
- connection objecturi
- ivorn of remote file
getLength
public long getLength()
- Description copied from class:
DataSource
- Returns the length of the stream returned by getInputStream
in bytes, if known.
A return value of -1 indicates that the length is unknown.
The return value of this method may change from -1 to a positive
value during the life of this object if it happens to work out
how long it is.
- Overrides:
getLength
in class DataSource
- Returns:
- the length of the stream in bytes, or -1
getRawInputStream
public InputStream getRawInputStream()
throws IOException
- Description copied from class:
DataSource
- Provides a new InputStream for this data source.
This method should be implemented by subclasses to provide
a new InputStream giving the raw content of the source each time
it is called. The general contract of this method is that each
time it is called it will return a stream with the same content.
- Specified by:
getRawInputStream
in class DataSource
- Returns:
- an InputStream containing the data of this source
- Throws:
IOException
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.