org.opcfoundation.ua.utils.bytebuffer
Class ByteBufferUtils

java.lang.Object
  extended by org.opcfoundation.ua.utils.bytebuffer.ByteBufferUtils

public class ByteBufferUtils
extends Object

ByteBufferUtils class.

Author:
Toni Kalajainen (toni.kalajainen@vtt.fi)

Constructor Summary
ByteBufferUtils()
           
 
Method Summary
static byte[] concatenate(byte[]... chunks)
          Concatenate two arrays to one
static void copy(ByteBuffer src, ByteBuffer dst, int length)
          copy.
static void copyRemaining(ByteBuffer src, ByteBuffer dst)
          Copies as much as possible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferUtils

public ByteBufferUtils()
Method Detail

copyRemaining

public static void copyRemaining(ByteBuffer src,
                                 ByteBuffer dst)
Copies as much as possible

Parameters:
src - a ByteBuffer object.
dst - a ByteBuffer object.

copy

public static void copy(ByteBuffer src,
                        ByteBuffer dst,
                        int length)

copy.

Parameters:
src - a ByteBuffer object.
dst - a ByteBuffer object.
length - a int.

concatenate

public static byte[] concatenate(byte[]... chunks)
Concatenate two arrays to one

Parameters:
chunks - an array of byte.
Returns:
concatenation of all chunks


Copyright © 2018. All rights reserved.