@Deprecated
public interface Streamable
byte[] data = new byte[1024];
Streamable st = ....;
while ( !st.eof() ) {
int length = st.read(data,0,data.length);
String s = new String(data,0,length);
System.out.println(s);
}
Modifier and Type | Method and Description |
---|---|
boolean |
eof()
Deprecated.
returns true if the stream has reached its end
|
int |
read(byte[] data,
int offset,
int length)
Deprecated.
read data into the byte array starting at offset
|
int |
write(byte[] data,
int offset,
int length)
Deprecated.
write data into the byte array starting at offset, maximum bytes read are (data.length-offset)
|
boolean eof()
int write(byte[] data, int offset, int length) throws java.io.IOException
data
- byte[] - the array to read data intooffset
- int - start position for writing datajava.io.IOException
int read(byte[] data, int offset, int length) throws java.io.IOException
data
- byte[] - the array to read data intooffset
- int - start position for writing datalength
- - the desired read lengthjava.io.IOException
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.