|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.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 RandomStreamRandomStream.getFilename()public void setFilename(String s)
RandomStream
setFilename in interface RandomStreamRandomStream.setFilename(java.lang.String)public boolean isOpen()
RandomStream
isOpen in interface RandomStreamRandomStream.isOpen()
public boolean openInputStream()
throws Exception
RandomStream
openInputStream in interface RandomStreamException - -
Usually IOException.RandomStream.openInputStream()public boolean closeInputStream()
RandomStream
closeInputStream in interface RandomStreamRandomStream.closeInputStream()
public byte readByte()
throws Exception
RandomStreamfirst time ( if !isOpen() ) open file/stream, and return byte
at end of file close stream and returns -1
readByte in interface RandomStreamExceptionRandomStream.readByte()
public int readInt()
throws Exception
RandomStream
readInt in interface RandomStreamExceptionRandomStream.readInt()
public long readLong()
throws Exception
RandomStream
readLong in interface RandomStreamExceptionRandomStream.readLong()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||