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
-
Method Summary
Modifier and TypeMethodDescriptiondump()
static String
dump
(byte[] data) static String
dump
(byte[] data, int offset, int length) dump
(int offset, int length) boolean
Tests 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 lengthint
hashCode()
int
length()
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
-