|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.gridlab.gat.io.FileInputStream
public class FileInputStream
A FileInputStream represents a connection to open file, the file may be
either remote or local. See FileInputStream
.
Constructor Summary | |
---|---|
FileInputStream(org.gridlab.gat.io.FileInputStreamInterface in)
Do not use this constructor, it is for internal GAT use. |
Method Summary | |
---|---|
void |
addMetricListener(MetricListener metricListener,
Metric metric)
This method adds the passed instance of a MetricListener to the
list of MetricListener s which are notified of MetricEvents by an
instance of this class. |
int |
available()
See FileInputStream.available() . |
void |
close()
See FileInputStream.close() . |
boolean |
equals(Object arg0)
See Object.equals(java.lang.Object) . |
org.gridlab.gat.io.FileInputStreamInterface |
getFileInputStreamInterface()
Returns the FileInputStreamInterface object associated with this FileInputStream . |
MetricEvent |
getMeasurement(Metric metric)
Returns a MetricEvent that represents the measured Metric . |
MetricDefinition |
getMetricDefinitionByName(String name)
Gets the MetricDefinition using its name . |
List<MetricDefinition> |
getMetricDefinitions()
This method returns a List of MetricDefinition
instances. |
int |
hashCode()
See Object.hashCode() . |
void |
mark(int arg0)
See InputStream.mark(int) . |
boolean |
markSupported()
See InputStream.markSupported() . |
int |
read()
See FileInputStream.read() . |
int |
read(byte[] arg0)
See FileInputStream.read(byte[]) . |
int |
read(byte[] arg0,
int arg1,
int arg2)
See FileInputStream.read(byte[], int, int) . |
void |
removeMetricListener(MetricListener metricListener,
Metric metric)
Removes the passed MetricListener from the List
of MetricListener s which are notified of MetricEvents
corresponding to the passed Metric instance. |
void |
reset()
See InputStream.reset() . |
long |
skip(long arg0)
See FileInputStream.skip(long) . |
String |
toString()
See Object.toString() . |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FileInputStream(org.gridlab.gat.io.FileInputStreamInterface in)
Method Detail |
---|
public org.gridlab.gat.io.FileInputStreamInterface getFileInputStreamInterface()
FileInputStream
. The FileInputStreamInterface offers the same
functionality as the FileInputStream
object. The difference
between the FileInputStreamInterface object and the FileInputStream
object is that the FileInputStreamInterface is an internal GAT object and
it will throw GATInvocationException
s upon failures, whereas the
FileInputStream object would have default values.
public MetricEvent getMeasurement(Metric metric) throws GATInvocationException
MetricEvent
that represents the measured Metric
.
getMeasurement
in interface Monitorable
MetricEvent
that represents the measured Metric
.
GATInvocationException
- the measurement failedpublic MetricDefinition getMetricDefinitionByName(String name) throws GATInvocationException
MetricDefinition
using its name
.
getMetricDefinitionByName
in interface Monitorable
name
- The MetricDefinition name
MetricDefinition
with the given name
GATInvocationException
- An error occurred while getting the list of
Metric
s or no Metric
with this name
existspublic void addMetricListener(MetricListener metricListener, Metric metric) throws GATInvocationException
MetricListener
to the
list of MetricListener
s which are notified of MetricEvents by an
instance of this class. The passed MetricListener
is only
notified of MetricEvents which correspond to Metric
instance
passed to this method.
addMetricListener
in interface Monitorable
metricListener
- The MetricListener
to notify of MetricEventsmetric
- The Metric
corresponding to the MetricEvents for
which the passed MetricListener
will be notified
GATInvocationException
- The MetricListener
cannot be addedpublic int available() throws IOException
FileInputStream.available()
.
available
in class InputStream
IOException
public void close() throws IOException
FileInputStream.close()
.
close
in interface Closeable
close
in class InputStream
IOException
public boolean equals(Object arg0)
Object.equals(java.lang.Object)
.
equals
in class Object
public List<MetricDefinition> getMetricDefinitions() throws GATInvocationException
List
of MetricDefinition
instances. Each instance in this List
is a
MetricDefinition
which can be monitored on this instance.
getMetricDefinitions
in interface Monitorable
List
of MetricDefinition
instances.
Each instance in this List
is a Metric
which can be monitored on this instance
GATInvocationException
- An error occurred while getting the list of metricspublic int hashCode()
Object.hashCode()
.
hashCode
in class Object
public void mark(int arg0)
InputStream.mark(int)
.
mark
in class InputStream
public boolean markSupported()
InputStream.markSupported()
.
markSupported
in class InputStream
public int read() throws IOException
FileInputStream.read()
.
read
in class InputStream
IOException
public int read(byte[] arg0) throws IOException
FileInputStream.read(byte[])
.
read
in class InputStream
IOException
public int read(byte[] arg0, int arg1, int arg2) throws IOException
FileInputStream.read(byte[], int, int)
.
read
in class InputStream
IOException
public void removeMetricListener(MetricListener metricListener, Metric metric) throws GATInvocationException
MetricListener
from the List
of MetricListener
s which are notified of MetricEvents
corresponding to the passed Metric
instance.
removeMetricListener
in interface Monitorable
metricListener
- The MetricListener
to notify of MetricEventsmetric
- The Metric
corresponding to the MetricEvents for
which the passed MetricListener
has been notified
GATInvocationException
- The MetricListener
cannot be removedpublic void reset() throws IOException
InputStream.reset()
.
reset
in class InputStream
IOException
public long skip(long arg0) throws IOException
FileInputStream.skip(long)
.
skip
in class InputStream
IOException
public String toString()
Object.toString()
.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |