java.lang.Object
org.codelibs.jcifs.smb.util.ByteEncodable
- All Implemented Interfaces:
Encodable
Interface for objects that can be encoded to byte arrays.
Provides standardized method for converting objects to their binary representation.
- Author:
- mbechler
-
Constructor Summary
ConstructorsConstructorDescriptionByteEncodable(byte[] b, int off, int len) Constructs a ByteEncodable object wrapping a byte array segment. -
Method Summary
-
Constructor Details
-
ByteEncodable
public ByteEncodable(byte[] b, int off, int len) Constructs a ByteEncodable object wrapping a byte array segment.- Parameters:
b- the byte array to wrapoff- the offset in the byte arraylen- the length of the segment to use
-
-
Method Details
-
size
public int size()Returns the size in bytes that this object will occupy when encoded. -
encode
public int encode(byte[] dst, int dstIndex) Encodes this object into the specified byte array.
-