Package org.snmp4j.asn1
Interface BERSerializable
- All Known Subinterfaces:
 SecurityParameters,Variable
- All Known Implementing Classes:
 AbstractVariable,BitString,Counter32,Counter64,Gauge32,GenericAddress,Integer32,IpAddress,MPv3.HeaderData,Null,OctetString,OID,Opaque,PDU,PDUv1,ScopedPDU,SMIAddress,SshAddress,TcpAddress,TimeTicks,TlsAddress,TransportIpAddress,TsmSecurityParameters,UdpAddress,UnsignedInteger32,UsmSecurityParameters,VariableBinding,VariantVariable
public interface BERSerializable
The interface 
BERSerializable 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
Modifier and TypeMethodDescriptionvoiddecodeBER(BERInputStream inputStream) Decodes aVariablefrom anInputStream.voidencodeBER(OutputStream outputStream) Encodes aVariableto anOutputStream.intReturns the length of thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER).intReturns the length of the payload of thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER). 
- 
Method Details
- 
getBERLength
int getBERLength()Returns the length of thisBERSerializableobject 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 thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER).- Returns:
 - the BER encoded length of this variable.
 
 - 
decodeBER
Decodes aVariablefrom anInputStream.- Parameters:
 inputStream- anInputStreamcontaining a BER encoded byte stream.- Throws:
 IOException- if the stream could not be decoded by using BER rules.
 - 
encodeBER
Encodes aVariableto anOutputStream.- Parameters:
 outputStream- anOutputStream.- Throws:
 IOException- if an error occurs while writing to the stream.
 
 -