org.opcfoundation.ua.utils.bytebuffer
Class ByteBufferArrayReadable

java.lang.Object
  extended by org.opcfoundation.ua.utils.bytebuffer.ByteBufferArrayReadable
All Implemented Interfaces:
IBinaryReadable

public class ByteBufferArrayReadable
extends Object
implements IBinaryReadable

ByteBufferArrayReadable class.

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

Constructor Summary
ByteBufferArrayReadable(ByteBuffer[] bufs)
          Constructor for ByteBufferArrayReadable.
ByteBufferArrayReadable(ByteQueue q)
          Constructor for ByteBufferArrayReadable.
 
Method Summary
 byte get()
          get.
 void get(byte[] dst)
          get.
 void get(byte[] dst, int offset, int length)
          get.
 void get(ByteBuffer buf)
          Get buf fully
 void get(ByteBuffer buf, int length)
          Get fully length bytes
 double getDouble()
          getDouble.
 float getFloat()
          getFloat.
 int getInt()
          getInt.
 long getLong()
          getLong.
 short getShort()
          getShort.
 long limit()
          limit.
 ByteOrder order()
          order.
 void order(ByteOrder order)
          order.
 long position()
          position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferArrayReadable

public ByteBufferArrayReadable(ByteBuffer[] bufs)

Constructor for ByteBufferArrayReadable.

Parameters:
bufs - an array of ByteBuffer objects.

ByteBufferArrayReadable

public ByteBufferArrayReadable(ByteQueue q)

Constructor for ByteBufferArrayReadable.

Parameters:
q - a ByteQueue object.
Method Detail

order

public ByteOrder order()

order.

Specified by:
order in interface IBinaryReadable
Returns:
a ByteOrder object.

order

public void order(ByteOrder order)

order.

Specified by:
order in interface IBinaryReadable
Parameters:
order - a ByteOrder object.

get

public byte get()
         throws IOException

get.

Specified by:
get in interface IBinaryReadable
Returns:
a byte.
Throws:
IOException - if any.

get

public void get(byte[] dst,
                int offset,
                int length)
         throws IOException

get.

Specified by:
get in interface IBinaryReadable
Parameters:
dst - an array of byte.
offset - a int.
length - a int.
Throws:
IOException - if any.

get

public void get(byte[] dst)
         throws IOException

get.

Specified by:
get in interface IBinaryReadable
Parameters:
dst - an array of byte.
Throws:
IOException - if any.

get

public void get(ByteBuffer buf)
         throws IOException
Get buf fully

Specified by:
get in interface IBinaryReadable
Parameters:
buf - a ByteBuffer object.
Throws:
IOException - if any.

get

public void get(ByteBuffer buf,
                int length)
         throws IOException
Get fully length bytes

Specified by:
get in interface IBinaryReadable
Parameters:
buf - a ByteBuffer object.
length - a int.
Throws:
IOException - if any.

getDouble

public double getDouble()
                 throws IOException

getDouble.

Specified by:
getDouble in interface IBinaryReadable
Returns:
a double.
Throws:
IOException - if any.

getFloat

public float getFloat()
               throws IOException

getFloat.

Specified by:
getFloat in interface IBinaryReadable
Returns:
a float.
Throws:
IOException - if any.

getInt

public int getInt()
           throws IOException

getInt.

Specified by:
getInt in interface IBinaryReadable
Returns:
a int.
Throws:
IOException - if any.

getLong

public long getLong()
             throws IOException

getLong.

Specified by:
getLong in interface IBinaryReadable
Returns:
a long.
Throws:
IOException - if any.

getShort

public short getShort()
               throws IOException

getShort.

Specified by:
getShort in interface IBinaryReadable
Returns:
a short.
Throws:
IOException - if any.

limit

public long limit()

limit.

Specified by:
limit in interface IBinaryReadable
Returns:
a long.

position

public long position()

position.

Specified by:
position in interface IBinaryReadable
Returns:
a long.


Copyright © 2018. All rights reserved.