hr.irb.random
Class QRBG

java.lang.Object
  extended by hr.irb.random.QRBG

public final class QRBG
extends Object

The QRBG class access the Quantum Random Bit Generator at the Rudjer Boskovic Institute

Author:
Brendan Burns

Field Summary
protected static byte AUTH_FAILED
           
protected  byte[] buffer
           
protected  int bufferPointer
           
protected  int bytesAvailable
           
protected static int DEFAULT_CACHE_SIZE
           
protected static byte GET_DATA_AUTH_CERT
           
protected static byte GET_DATA_AUTH_PLAIN
           
protected static byte GET_INFO_AUTH_CERT
           
protected static byte GET_INFO_AUTH_PLAIN
           
protected  String host
           
protected static byte ILL_FORMED_REQUEST
           
protected  InputStream in
           
protected  byte[] msg
           
protected static byte OK
           
protected  OutputStream out
           
protected  String pass
           
protected  int port
           
protected static byte QUOTA_EXCEEDED
           
protected  Socket s
           
protected static byte SERVER_ERROR
           
protected static byte SERVER_STOPPING
           
protected  byte[] temp
           
protected static byte TIMEOUT
           
protected static byte UNKNOWN_OP
           
protected  String user
           
 
Constructor Summary
QRBG(String host, int port, String user, String pass)
          Constructor
QRBG(String user, String pass)
          Constructor, uses default host ("random.irb.hr") and port (1227)
 
Method Summary
 void getBytes(byte[] data, int count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected byte[] buffer

msg

protected byte[] msg

temp

protected byte[] temp

bufferPointer

protected int bufferPointer

bytesAvailable

protected int bytesAvailable

s

protected Socket s

in

protected InputStream in

out

protected OutputStream out

host

protected String host

port

protected int port

user

protected String user

pass

protected String pass

DEFAULT_CACHE_SIZE

protected static final int DEFAULT_CACHE_SIZE
See Also:
Constant Field Values

GET_DATA_AUTH_PLAIN

protected static final byte GET_DATA_AUTH_PLAIN
See Also:
Constant Field Values

GET_DATA_AUTH_CERT

protected static final byte GET_DATA_AUTH_CERT
See Also:
Constant Field Values

GET_INFO_AUTH_PLAIN

protected static final byte GET_INFO_AUTH_PLAIN
See Also:
Constant Field Values

GET_INFO_AUTH_CERT

protected static final byte GET_INFO_AUTH_CERT
See Also:
Constant Field Values

OK

protected static final byte OK
See Also:
Constant Field Values

SERVER_STOPPING

protected static final byte SERVER_STOPPING
See Also:
Constant Field Values

SERVER_ERROR

protected static final byte SERVER_ERROR
See Also:
Constant Field Values

UNKNOWN_OP

protected static final byte UNKNOWN_OP
See Also:
Constant Field Values

ILL_FORMED_REQUEST

protected static final byte ILL_FORMED_REQUEST
See Also:
Constant Field Values

TIMEOUT

protected static final byte TIMEOUT
See Also:
Constant Field Values

AUTH_FAILED

protected static final byte AUTH_FAILED
See Also:
Constant Field Values

QUOTA_EXCEEDED

protected static final byte QUOTA_EXCEEDED
See Also:
Constant Field Values
Constructor Detail

QRBG

public QRBG(String user,
            String pass)
Constructor, uses default host ("random.irb.hr") and port (1227)

Parameters:
user - Your user name
pass - Your password

QRBG

public QRBG(String host,
            int port,
            String user,
            String pass)
Constructor

Parameters:
host - The host of the server
port - The port of the server
user - Your user name
pass - Your password
Method Detail

getBytes

public void getBytes(byte[] data,
                     int count)
              throws IOException,
                     ServiceDeniedException
Throws:
IOException
ServiceDeniedException


Submit a bug or request a featureCopyright © (2008-2011) Roberto Javier Godoy
Project Web Hosted by SourceForge.netSouceForge.net is registered trademark of SourceForge, Inc., in the United States and other countries.