|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
gr.uoa.di.madgik.grs.record.field.mediation.MediatingInputStream
public class MediatingInputStream
This class extends the InputStream
providing a utility by which a client can access the
payload of a Field
without needing to take actions depending on whether the full payload of the
field is locally available or it is transfered using a transport directive of IBuffer.TransportDirective.Partial
.
Its function makes sure that additional payload is requested whenever more data is requested. To avoid
unnecessary data traffic, additional payload requests are made whenever the client needs to access more
data than what is already available. If a client knows beforehand that he is going to need the full payload
of the field, an alternative would be to make a request through Field.makeAvailable()
to make sure the full
payload is available once the invocation is completed. The amount of data that is transfered and made available
on every request is subject to the specific FieldDefinition
and more particularly to the value set using
FieldDefinition.setChunkSize(int)
. If the data is already available, then no remote request is needed
or performed.
Method Summary | |
---|---|
int |
available()
|
void |
close()
|
void |
mark(int readlimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
reset()
|
long |
skip(long n)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean markSupported()
markSupported
in class java.io.InputStream
InputStream.markSupported()
public void mark(int readlimit)
mark
in class java.io.InputStream
InputStream.mark(int)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
InputStream.close()
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
InputStream.available()
public int read() throws java.io.IOException
Before forwarding the request to the underlying InputStream
, it is checked if there is one byte
available in the underlying InputStream
and if there isn't, a request for more data is send
read
in class java.io.InputStream
java.io.IOException
InputStream.read()
public int read(byte[] b) throws java.io.IOException
Before forwarding the request to the underlying InputStream
, it is checked if there are b.length bytes
available in the underlying InputStream
and if there aren't, a request for more data is send
read
in class java.io.InputStream
java.io.IOException
InputStream.read(byte[])
public int read(byte[] b, int off, int len) throws java.io.IOException
Before forwarding the request to the underlying InputStream
, it is checked if there are len
bytes
available in the underlying InputStream
and if there aren't, a request for more data is send
read
in class java.io.InputStream
java.io.IOException
InputStream.read(byte[], int, int)
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
InputStream.reset()
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
InputStream.skip(long)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |