-
- All Known Subinterfaces:
SecurityParameters
,Variable
- All Known Implementing Classes:
AbstractVariable
,BitString
,Counter32
,Counter64
,DtlsAddress
,Gauge32
,GenericAddress
,Integer32
,IpAddress
,MPv3.HeaderData
,Null
,OctetString
,OID
,Opaque
,PDU
,PDUv1
,ScopedPDU
,SMIAddress
,TcpAddress
,TimeTicks
,TlsAddress
,TransportIpAddress
,TsmSecurityParameters
,UdpAddress
,UnsignedInteger32
,UsmSecurityParameters
,VariableBinding
,VariantVariable
public interface BERSerializable
The interfaceBERSerializable
has to be implemented by any data type class that needs to be serialized using the Basic Encoding Rules (BER) that provides enconding rules for ASN.1 data types.- Version:
- 1.0
- Author:
- Frank Fock, Jochen Katz
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
decodeBER(BERInputStream inputStream)
Decodes aVariable
from anInputStream
.void
encodeBER(java.io.OutputStream outputStream)
Encodes aVariable
to anOutputStream
.int
getBERLength()
Returns the length of thisBERSerializable
object in bytes when encoded according to the Basic Encoding Rules (BER).int
getBERPayloadLength()
Returns the length of the payload of thisBERSerializable
object in bytes when encoded according to the Basic Encoding Rules (BER).
-
-
-
Method Detail
-
getBERLength
int getBERLength()
Returns the length of thisBERSerializable
object in bytes when encoded according to the Basic Encoding Rules (BER).- Returns:
- the BER encoded length of this variable.
-
getBERPayloadLength
int getBERPayloadLength()
Returns the length of the payload of thisBERSerializable
object in bytes when encoded according to the Basic Encoding Rules (BER).- Returns:
- the BER encoded length of this variable.
-
decodeBER
void decodeBER(BERInputStream inputStream) throws java.io.IOException
Decodes aVariable
from anInputStream
.- Parameters:
inputStream
- anInputStream
containing a BER encoded byte stream.- Throws:
java.io.IOException
- if the stream could not be decoded by using BER rules.
-
encodeBER
void encodeBER(java.io.OutputStream outputStream) throws java.io.IOException
Encodes aVariable
to anOutputStream
.- Parameters:
outputStream
- anOutputStream
.- Throws:
java.io.IOException
- if an error occurs while writing to the stream.
-
-