Package marauroa.common.net.message
Class MessageSendByteArray
java.lang.Object
marauroa.common.net.message.Message
marauroa.common.net.message.MessageSendByteArray
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MessageC2SLoginSendNonceNameAndPassword
,MessageC2SLoginSendNonceNamePasswordAndSeed
,MessageC2SLoginSendPromise
,MessageC2SLoginSendUsernameAndPassword
,MessageS2CLoginSendNonce
This message is a generic message that send a byte array.
- See Also:
Message
-
Nested Class Summary
Nested classes/interfaces inherited from class marauroa.common.net.message.Message
Message.MessageType
-
Field Summary
Fields inherited from class marauroa.common.net.message.Message
channel, clientid, CLIENTID_INVALID, protocolVersion, timestampMessage, type
-
Constructor Summary
ConstructorDescriptionConstructor for allowing creation of an empty messageMessageSendByteArray(Message.MessageType type, Channel source, byte[] hash)
Constructor with a TCP/IP source/destination of the message and the byte array to send. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getHash()
This method returns the byte array.void
Serialize the object from an ObjectInputvoid
writeObject(OutputSerializer out)
Serialize the object into an ObjectOutputMethods inherited from class marauroa.common.net.message.Message
getAddress, getChannel, getClientID, getMessageTimestamp, getProtocolVersion, getType, internalToString, isPerception, isSkippable, readFromMap, requiresPerception, setChannel, setClientID, setProtocolVersion, toString, writeToJson
-
Field Details
-
hash
protected byte[] hash
-
-
Constructor Details
-
MessageSendByteArray
Constructor for allowing creation of an empty message- Parameters:
type
- tpye of message
-
MessageSendByteArray
Constructor with a TCP/IP source/destination of the message and the byte array to send.- Parameters:
type
- tpye of messagesource
- The TCP/IP address associated to this messagehash
- The byte array you want to send.
-
-
Method Details
-
getHash
public byte[] getHash()This method returns the byte array.- Returns:
- the byte array
-
writeObject
Description copied from class:Message
Serialize the object into an ObjectOutput- Specified by:
writeObject
in interfaceSerializable
- Overrides:
writeObject
in classMessage
- Parameters:
out
- the output serializer.- Throws:
IOException
- if the serializations fails
-
readObject
Description copied from class:Message
Serialize the object from an ObjectInput- Specified by:
readObject
in interfaceSerializable
- Overrides:
readObject
in classMessage
- Parameters:
in
- the input serializer- Throws:
IOException
- if the serializations fails
-