public interface BinaryMessage extends Message
Message.BuilderBODY_OFFSET, HEADER_SIZE, MAX_BODY_SIZE, MESSAGE_TYPE_OFFSET, NET_ID_OFFSET, PAYLOAD_LENGTH_OFFSET, SERVICE_ID_OFFSET, SIGNATURE_SIZE, VERSION_OFFSET| Modifier and Type | Method and Description |
|---|---|
static BinaryMessage |
fromBytes(byte[] messageBytes)
Creates a binary message from a byte array.
|
java.nio.ByteBuffer |
getMessage()
Returns the whole binary message.
|
default com.exonum.binding.hash.HashCode |
hash()
Returns the SHA-256 hash of this message.
|
getBody, getMessageType, getNetworkId, getServiceId, getSignature, getVersion, messageSize, signatureOffset, sizestatic BinaryMessage fromBytes(byte[] messageBytes)
messageBytes - an array with message bytesjava.lang.IllegalArgumentException - if message has invalid sizejava.nio.ByteBuffer getMessage()
default com.exonum.binding.hash.HashCode hash()
Copyright © 2018 Exonum. All rights reserved.