|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.fasteasytrade.JRandTest.IO.FileRandomStream
com.fasteasytrade.JRandTest.IO.FileAlgoRandomStream
| Field Summary | |
int |
maxCount
|
byte[] |
privateKey
|
int |
privateKeyLength
|
byte[] |
publicKey
|
int |
publicKeyLength
|
| Fields inherited from class com.fasteasytrade.JRandTest.IO.FileRandomStream |
actualSize, buffer, count, countLastRead, filename, infile, open, SIZE |
| Constructor Summary | |
FileAlgoRandomStream()
|
|
FileAlgoRandomStream(String s)
|
|
| Method Summary | |
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. |
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. |
void |
setPrivateKey(byte[] k)
Set private key, if any, to algorithm |
void |
setPrivateKeyFromFile(String f)
Set private key, if any, to algorithm from file |
void |
setPublicKey(byte[] k)
Set public or symetric key to algorithm |
void |
setPublicKeyFromFile(String f)
Set public or symetric key to algorithm from file |
void |
setup()
setup will be implemented by each subclass |
void |
setupKeys()
set up length and new arrays to public and private keys will be implemented by each algorithm |
| Methods inherited from class com.fasteasytrade.JRandTest.IO.FileRandomStream |
closeInputStream, finalize, isOpen, openInputStream |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.fasteasytrade.JRandTest.IO.RandomStream |
closeInputStream, isOpen, openInputStream |
| Field Detail |
public int publicKeyLength
public byte[] publicKey
public int privateKeyLength
public byte[] privateKey
public int maxCount
| Constructor Detail |
public FileAlgoRandomStream()
public FileAlgoRandomStream(String s)
| Method Detail |
public void setupKeys()
AlgoRandomStreamwill be implemented by each algorithm
setupKeys in interface AlgoRandomStreamAlgoRandomStream.setupKeys()public void setPublicKeyFromFile(String f)
AlgoRandomStream
setPublicKeyFromFile in interface AlgoRandomStreamf - file name with public or symetric keyAlgoRandomStream.setPublicKeyFromFile(java.lang.String)public void setPublicKey(byte[] k)
AlgoRandomStream
setPublicKey in interface AlgoRandomStreamk - byte array of public or symetric keyAlgoRandomStream.setPublicKey(byte[])public void setPrivateKeyFromFile(String f)
AlgoRandomStream
setPrivateKeyFromFile in interface AlgoRandomStreamf - file name with private keyAlgoRandomStream.setPrivateKeyFromFile(java.lang.String)public void setPrivateKey(byte[] k)
AlgoRandomStream
setPrivateKey in interface AlgoRandomStreamk - byte array of private keyAlgoRandomStream.setPrivateKey(byte[])public void setup()
setup in interface AlgoRandomStreamAlgoRandomStream.setup()public void setFilename(String s)
RandomStream
setFilename in interface RandomStreamsetFilename in class FileRandomStreams - set algorithm input filename fileRandomStream.setFilename(java.lang.String)public String getFilename()
RandomStream
getFilename in interface RandomStreamgetFilename in class FileRandomStreamRandomStream.getFilename()
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 RandomStreamreadByte in class FileRandomStreamExceptionRandomStream.readByte()
public int readInt()
throws Exception
RandomStream
readInt in interface RandomStreamreadInt in class FileRandomStreamExceptionRandomStream.readInt()
public long readLong()
throws Exception
RandomStream
readLong in interface RandomStreamreadLong in class FileRandomStreamExceptionRandomStream.readLong()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||