|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cisco.provisioning.cpe.extensions.configuration.AbstractTFTPFile
com.cisco.provisioning.cpe.extensions.configuration.DOCSISTFTPFile
com.cisco.provisioning.cpe.extensions.configuration.PacketCableTFTPFile
public final class PacketCableTFTPFile
Look at EDCS-192364 for design of this data structure. Packet Cable TFTP file. This class provides an implementation of a TFTPFile interface for static or dynamic Packet Cable files. This file provides for the ability to build a Packet Cable file dynamically by adding top-level OptionValue instances. During the generation() method the OptionValue instances are processed into a binary configuration. The mix() method provides for the encryption of the TFTPFile.
Multiple constructors are provided, but the expected use case is that the null-arg constructor is used, followed by multiple calls to the add() method to build the PacketCableTFTPFile dynamically.
AbstractTFTPFile,
TFTPFile,
OptionValue,
MTAKeys,
Serialized Form| Constructor Summary | |
|---|---|
PacketCableTFTPFile()
No-arg constructor. |
|
PacketCableTFTPFile(byte[] fileBytes)
Use this constructor when no filename tag is used and the configuration file bytes is known at construction time. |
|
PacketCableTFTPFile(String filename)
Use this constructor when the filename is known at construction time, but the configuration file contents are created later. |
|
PacketCableTFTPFile(String filename,
byte[] fileBytes)
Use this constructor when the filename and configuration file bytes are known at construction time. |
|
| Method Summary | |
|---|---|
void |
decode(ByteArrayInputStream in,
com.cisco.csrc.encode.DataDecoder decoder)
Decodes object's data and sets object's variables. |
void |
display(PrintWriter output,
String prefix,
List<String> options,
boolean verbose)
Display the contents of this object for debugging. |
void |
encode(ByteArrayOutputStream out,
com.cisco.csrc.encode.DataEncoder encoder)
Encodes object's data. |
boolean |
equals(Object object)
Indicates whether some other object is "equal to" this one. |
void |
generate()
Specialization of the normal DOCSIS file binary generation. |
byte[] |
getConfigFileHash(String macstr,
byte[] informData,
CSRCProperties csrcProp)
Called on receipt of IM_MTA_SECINFO_REQ. |
byte[] |
getFile()
Get the configuration file to be delivered to the device. |
byte[] |
getKeyMaterial()
Gets the key material |
int |
getLocale()
Get the locale. |
String |
getStaticFilename()
Gets the static filename |
int |
hashCode()
Returns the hashcode for this PacketCableTFTPFile. |
boolean |
isBasicProvModeFile()
Get the BASIC file mode indicator. |
void |
mix(String ipAddress,
CSRCProperties csrcProp)
Perform DPE mixing. |
String |
paramString()
Returns a string representing the state of the TFTPFile object. |
void |
readExternal(ObjectInput in)
Externalizable interface. |
void |
setBasicProvModeFile(boolean b)
Set the BASIC mode file indicator. |
void |
setKeyMaterial(byte[] keyMaterial)
Sets the key material |
void |
setLocale(int locale)
Set the locale. |
void |
setStaticFilename(String staticFilename)
Sets the static filename |
void |
writeExternal(ObjectOutput out)
Externalizable interface. |
| Methods inherited from class com.cisco.provisioning.cpe.extensions.configuration.DOCSISTFTPFile |
|---|
add, add, calcCMTSmicUsingMD5, calcCMTSmicUsingMMH, catByteArrays, clear, getOptionValueList, size, validate |
| Methods inherited from class com.cisco.provisioning.cpe.extensions.configuration.AbstractTFTPFile |
|---|
getFilename, getProperties, getProperty, setProperty, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PacketCableTFTPFile()
public PacketCableTFTPFile(String filename)
filename - public PacketCableTFTPFile(byte[] fileBytes)
fileBytes -
public PacketCableTFTPFile(String filename,
byte[] fileBytes)
filename - fileBytes - | Method Detail |
|---|
public byte[] getFile()
getFile in interface TFTPFilegetFile in class AbstractTFTPFile
public byte[] getConfigFileHash(String macstr,
byte[] informData,
CSRCProperties csrcProp)
macstr - informData - csrcProp -
public void mix(String ipAddress,
CSRCProperties csrcProp)
throws InvalidConfigException
mix in interface TFTPFilemix in class DOCSISTFTPFileipAddress - of the device requesting the TFTP filecsrcProp - relevant to mixing operation
InvalidConfigException - if any errors are encountered during the
mixing.
public void display(PrintWriter output,
String prefix,
List<String> options,
boolean verbose)
The output from this method is expected to be easier to read, with
possibly less detail than is produced by toString. The
output can be multi-line if that makes it easier to read.
display in interface com.cisco.csrc.util.Displayabledisplay in class DOCSISTFTPFileoutput - the resulting output is written to this parameter.prefix - string to output before each line, usually blanks to indent
this output to show association with parent object.options - list of string options to control output.verbose - true indicates detailed output desired.public String paramString()
null.
paramString in class DOCSISTFTPFilepublic int hashCode()
hashCode in class DOCSISTFTPFilepublic boolean equals(Object object)
equals in class DOCSISTFTPFileobject - to compare
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class DOCSISTFTPFilein - the stream to read data from in order to restore the object
IOException - if I/O errors occur
ClassNotFoundException - If the class for an object being
restored cannot be found.
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class DOCSISTFTPFileout - the stream to write the object to
IOException - Includes any I/O exceptions that may occur
public void encode(ByteArrayOutputStream out,
com.cisco.csrc.encode.DataEncoder encoder)
encode in interface com.cisco.csrc.encode.Encodableencode in class DOCSISTFTPFileout - the output stream to write toencoder - the encoder to use
public void decode(ByteArrayInputStream in,
com.cisco.csrc.encode.DataDecoder decoder)
decode in interface com.cisco.csrc.encode.Encodabledecode in class DOCSISTFTPFilein - the input stream to write todecoder - the decoder to usepublic void setStaticFilename(String staticFilename)
staticFilename - public String getStaticFilename()
public void setKeyMaterial(byte[] keyMaterial)
keyMaterial - public byte[] getKeyMaterial()
public void generate()
throws InvalidConfigException
generate in interface TFTPFilegenerate in class DOCSISTFTPFileInvalidConfigException - if any errors are encountered during the
generation.public boolean isBasicProvModeFile()
public void setBasicProvModeFile(boolean b)
b - public void setLocale(int locale)
locale - public int getLocale()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||