|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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()
AlgoRandomStream
will be implemented by each algorithm
setupKeys
in interface AlgoRandomStream
AlgoRandomStream.setupKeys()
public void setPublicKeyFromFile(String f)
AlgoRandomStream
setPublicKeyFromFile
in interface AlgoRandomStream
f
- file name with public or symetric keyAlgoRandomStream.setPublicKeyFromFile(java.lang.String)
public void setPublicKey(byte[] k)
AlgoRandomStream
setPublicKey
in interface AlgoRandomStream
k
- byte array of public or symetric keyAlgoRandomStream.setPublicKey(byte[])
public void setPrivateKeyFromFile(String f)
AlgoRandomStream
setPrivateKeyFromFile
in interface AlgoRandomStream
f
- file name with private keyAlgoRandomStream.setPrivateKeyFromFile(java.lang.String)
public void setPrivateKey(byte[] k)
AlgoRandomStream
setPrivateKey
in interface AlgoRandomStream
k
- byte array of private keyAlgoRandomStream.setPrivateKey(byte[])
public void setup()
setup
in interface AlgoRandomStream
AlgoRandomStream.setup()
public void setFilename(String s)
RandomStream
setFilename
in interface RandomStream
setFilename
in class FileRandomStream
s
- set algorithm input filename fileRandomStream.setFilename(java.lang.String)
public String getFilename()
RandomStream
getFilename
in interface RandomStream
getFilename
in class FileRandomStream
RandomStream.getFilename()
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
readByte
in class FileRandomStream
Exception
RandomStream.readByte()
public int readInt() throws Exception
RandomStream
readInt
in interface RandomStream
readInt
in class FileRandomStream
Exception
RandomStream.readInt()
public long readLong() throws Exception
RandomStream
readLong
in interface RandomStream
readLong
in class FileRandomStream
Exception
RandomStream.readLong()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |