Package com.opencloud.util
Interface FastSerializable
-
- All Known Implementing Classes:
AccessPointName
,AccessPointName
,AccessPointNameOperatorId
,AddressDelimiter
,AddressString
,ASN1Time
,BearerCapability
,BearerCapability.ITU_T
,CalledPartyBCDNumber
,CalledPartyNumber
,CallingPartyNumber
,CallingPartyRestriction
,CallingPartysCategory
,CAPIPSSPCapabilities
,Cause
,CellGlobalId
,Code
,CUGInterLockCode
,DateAndTime
,EncodedStringWithIndicators
,ExtForwOptions
,ForwardCallIndicators
,ForwardingOptions
,GenericDigits
,GenericDigitsWithStarHash
,GenericNumber
,GenericNumberWithB
,GSMSupplementaryServiceList
,HighLayerCompatibility
,HourMinute
,IMEIAddress
,IMSIAddress
,IntSet
,ISDNSubaddress
,LegType
,LMSIAddress
,LocalisedServiceAreaId
,LocationAreaId
,LocationNumber
,MMCode
,MSBearerCapability
,MSBearerCapability.GSM
,MSBearerCapability.GSM.Content
,MSBearerCapability.GSM.Content.NonSpeech
,MSBearerCapability.GSM.Content.Speech
,MSClassmark
,MSClassmark.MSClassmark1
,MSClassmark.MSClassmark2
,NSAPAddress
,OriginalCalledNumber
,PriceInHundredthsOfUnits
,RedirectingPartyNumber
,RedirectionInformation
,RPCause
,SccpAddress
,Signal
,SMSAddress
,SMSCommand
,SMSDataCodingScheme
,SMSDeliver
,SMSDeliverReportAck
,SMSDeliverReportError
,SMSProtocolId
,SMSStatusReport
,SMSSubmit
,SMSSubmitReportAck
,SMSSubmitReportError
,SMSTimeStamp
,SSCode
,StringIndicators
,TimeAndTimezone
,Treatment
,YearMonthDay
public interface FastSerializable
FastSerializable provides an alternative to the Serializable interface where the exact type of the object to be serialized is known at compile time.Classes implementing FastSerializable should provide a public constructor that takes either:
- a single
DataInput
argument; or - a
DataInput
argument and aClassLoader
argument.
DataInput
stream. The ClassLoader argument, if included, can be used to resolve any application-specific classes stored in the stream. The FastSerialize framework generates code invoking either constructor to build new objects when deserializing. If both constructors are present in a given class then the two-argument constructor is used as first preference.Some caveats apply to objects implementing FastSerializable:
- the type of object to reconstruct is typically determined at generation time, not run time, so care must be taken that objects are restored using the correct type. Making classes that implement FastSerializable final may be a good idea.
- no handling of shared references to objects is done; if an object is encountered twice during serialization, then two copies of the object will exist upon deserialization.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
toStream(DataOutput stream)
Serialize the state of this object to a stream.
-
-
-
Method Detail
-
toStream
void toStream(DataOutput stream) throws IOException
Serialize the state of this object to a stream.- Parameters:
stream
- the stream to serialize to.- Throws:
IOException
- if an error occurs during serialization
-
-