Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java combine to byte[]

byte[] one = getBytesForOne();
byte[] two = getBytesForTwo();
byte[] combined = new byte[one.length + two.length];

for (int i = 0; i < combined.length; ++i)
{
    combined[i] = i < one.length ? one[i] : two[i - one.length];
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #combine
ADD COMMENT
Topic
Name
6+6 =