|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opends.server.protocols.asn1.ASN1Reader
@PublicAPI(stability=UNCOMMITTED,
mayInstantiate=true,
mayExtend=false,
mayInvoke=true)
public final class ASN1ReaderThis class defines a utility that can be used to read ASN.1 elements from a provided socket or input stream.
| Constructor Summary | |
|---|---|
ASN1Reader(java.io.InputStream inputStream)
Creates a new ASN.1 reader that will read elements from the provided input stream. |
|
ASN1Reader(java.net.Socket socket)
Creates a new ASN.1 reader that will read elements from the provided socket. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this ASN.1 reader and the underlying input stream and/or socket. |
int |
getIOTimeout()
Retrieves the maximum length of time in milliseconds that this reader will be allowed to block while waiting to read data. |
int |
getMaxElementSize()
Retrieves the maximum size in bytes that will be allowed for elements read using this reader. |
ASN1Element |
readElement()
Reads an ASN.1 element from the associated input stream. |
void |
setIOTimeout(int ioTimeout)
Specifies the maximum length of time in milliseconds that this reader should be allowed to block while waiting to read data. |
void |
setMaxElementSize(int maxElementSize)
Specifies the maximum size in bytes that will be allowed for elements. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ASN1Reader(java.net.Socket socket)
throws java.io.IOException
socket - The socket from which to read the ASN.1 elements.
java.io.IOException - If a problem occurs while attempting to obtain the
input stream for the socket.public ASN1Reader(java.io.InputStream inputStream)
inputStream - The input stream from which to read the ASN.1
elements.| Method Detail |
|---|
public int getMaxElementSize()
public void setMaxElementSize(int maxElementSize)
maxElementSize - The maximum size in bytes that will be allowed for
elements read using this reader.
public int getIOTimeout()
throws java.io.IOException
java.io.IOException - If a problem occurs while polling the socket to
determine the timeout.
public void setIOTimeout(int ioTimeout)
throws java.io.IOException
ioTimeout - The maximum length of time in milliseconds that this
reader should be allowed to block while waiting to read
data, or 0 if there should be no limit.
java.io.IOException - If a problem occurs while setting the underlying
socket option.
public ASN1Element readElement()
throws java.io.IOException,
ASN1Exception
null if the end of the stream has been reached.
java.io.IOException - If a problem occurs while attempting to read from the
input stream.
ASN1Exception - If a problem occurs while attempting to decode the
data read as an ASN.1 element.public void close()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||