java.lang.Object
com.blackhillsoftware.smf.Data
- Direct Known Subclasses:
AggregateGroup.IDsnMem,BaseConfiguration.SystemFeatures,BaseConfiguration.SystemInformation,Drive.Status,Library.Status,SmfData,SmsVolume.Status,StorageGroup.Library,StorageGroup.Status,Token,VRecord
Base class to contain data for records and sections
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondump()static Stringdump(byte[] data) static Stringdump(byte[] data, int offset, int length) dump(int offset, int length) booleanTests equality, returns true if data arrays contain the same data, and objects are of the same type.byte[]getBytes()Get a copy of the data in this record or sectionbyte[]getBytes(int offset, int length) Get a copy of the data in this record or section from a particular offset and lengthinthashCode()intlength()Get the length of the datatoString()
-
Constructor Details
-
Data
public Data(byte[] source, int offset, int length) Create a Data section with data copied from an existing byte array- Parameters:
source- the byte array containing the SMF recordoffset- the offset of the start of the recordlength- the length of the record
-
Data
public Data(byte[] source) Create a Data section from a byte array.- Parameters:
source- a byte array containing a complete section
-
-
Method Details
-
length
public int length()Get the length of the data- Returns:
- int length
-
getBytes
public byte[] getBytes()Get a copy of the data in this record or section- Returns:
- A byte array with a copy of this section
-
getBytes
public byte[] getBytes(int offset, int length) Get a copy of the data in this record or section from a particular offset and length- Parameters:
offset- offset from the start of the datalength- the length of the data to be returned- Returns:
- A byte array with the bytes requested.
-
dump
-
dump
-
dump
-
dump
-
equals
Tests equality, returns true if data arrays contain the same data, and objects are of the same type. -
hashCode
public int hashCode() -
toString
-