Java Code Examples for org.ethereum.util.ByteUtil#merge()

The following examples show how to use org.ethereum.util.ByteUtil#merge() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CountingBytesSource.java    From nuls-v2 with MIT License 4 votes vote down vote up
/**
 * Composes value and counter into backing Source value
 */
protected byte[] encodeCount(byte[] val, int count) {
    return ByteUtil.merge(RLP.encodeInt(count), val);
}
 
Example 2
Source File: CountingBytesSource.java    From nuls with MIT License 4 votes vote down vote up
/**
 * Composes value and counter into backing Source value
 */
protected byte[] encodeCount(byte[] val, int count) {
    return ByteUtil.merge(RLP.encodeInt(count), val);
}