com.mockrunner.mock.connector.cci
Class MockStreamableByteArrayRecord
java.lang.Object
com.mockrunner.mock.connector.cci.MockRecord
com.mockrunner.mock.connector.cci.MockStreamableByteArrayRecord
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, javax.resource.cci.Record, javax.resource.cci.Streamable
public class MockStreamableByteArrayRecord
- extends MockRecord
- implements javax.resource.cci.Streamable
Streamable Record
backed by a byte array.
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object object)
|
byte[] |
getContent()
Returns a copy of the underlying byte array. |
int |
hashCode()
|
void |
read(java.io.InputStream stream)
|
void |
setContent(byte[] content)
Sets the content of this record. |
void |
write(java.io.OutputStream stream)
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
MockStreamableByteArrayRecord
public MockStreamableByteArrayRecord()
MockStreamableByteArrayRecord
public MockStreamableByteArrayRecord(java.lang.String name)
MockStreamableByteArrayRecord
public MockStreamableByteArrayRecord(java.lang.String name,
java.lang.String description)
getContent
public byte[] getContent()
- Returns a copy of the underlying byte array.
- Returns:
- the underlying data
setContent
public void setContent(byte[] content)
- Sets the content of this record. The specified array
will be copied.
- Parameters:
content
- the content
read
public void read(java.io.InputStream stream)
throws java.io.IOException
- Specified by:
read
in interface javax.resource.cci.Streamable
- Throws:
java.io.IOException
write
public void write(java.io.OutputStream stream)
throws java.io.IOException
- Specified by:
write
in interface javax.resource.cci.Streamable
- Throws:
java.io.IOException
equals
public boolean equals(java.lang.Object object)
- Specified by:
equals
in interface javax.resource.cci.Record
- Overrides:
equals
in class MockRecord
hashCode
public int hashCode()
- Specified by:
hashCode
in interface javax.resource.cci.Record
- Overrides:
hashCode
in class MockRecord
clone
public java.lang.Object clone()
- Specified by:
clone
in interface javax.resource.cci.Record
- Overrides:
clone
in class MockRecord