|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasteasytrade.JRandTest.IO.HttpGetUrlRandomStream
This class represents an encrypted or random source HTTP Url source.
Data, bytes or int32, are read from url.
Field Summary | |
(package private) byte[] |
buffer
|
(package private) URLConnection |
con
|
(package private) int |
count
|
(package private) int |
countLastRead
|
(package private) String |
filename
|
(package private) DataInputStream |
infile
|
(package private) int |
lengthOfData
|
(package private) boolean |
open
|
(package private) int |
SIZE
|
(package private) URL |
url
|
Constructor Summary | |
HttpGetUrlRandomStream()
|
|
HttpGetUrlRandomStream(String s)
|
Method Summary | |
boolean |
closeInputStream()
close the input stream. |
String |
getFilename()
get the file name to be processed. this file is the raw data to be read, or the input file processed by algorithm. |
boolean |
isOpen()
check if RandomStream is open |
boolean |
openInputStream()
open the input stream. |
byte |
readByte()
read one byte from a file. |
int |
readInt()
Processing is similar to readByte. |
long |
readLong()
Processing is similar to readByte. |
void |
setFilename(String s)
set file name to be processed. this file is the raw data to be read, or the input file processed by algorithm. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
boolean open
DataInputStream infile
String filename
URL url
URLConnection con
int lengthOfData
int count
int countLastRead
final int SIZE
byte[] buffer
Constructor Detail |
public HttpGetUrlRandomStream()
public HttpGetUrlRandomStream(String s)
Method Detail |
public String getFilename()
RandomStream
getFilename
in interface RandomStream
RandomStream.getFilename()
public void setFilename(String s)
RandomStream
setFilename
in interface RandomStream
RandomStream.setFilename(java.lang.String)
public boolean isOpen()
RandomStream
isOpen
in interface RandomStream
RandomStream.isOpen()
public boolean openInputStream() throws Exception
RandomStream
openInputStream
in interface RandomStream
Exception
- -
Usually IOException.RandomStream.openInputStream()
public boolean closeInputStream()
RandomStream
closeInputStream
in interface RandomStream
RandomStream.closeInputStream()
public byte readByte() throws Exception
RandomStream
first time ( if !isOpen() ) open file/stream, and return byte
at end of file close stream and returns -1
readByte
in interface RandomStream
Exception
RandomStream.readByte()
public int readInt() throws Exception
RandomStream
readInt
in interface RandomStream
Exception
RandomStream.readInt()
public long readLong() throws Exception
RandomStream
readLong
in interface RandomStream
Exception
RandomStream.readLong()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |