Class AlignByteAccessor

java.lang.Object
pcap.common.memory.accessor.AlignByteAccessor
All Implemented Interfaces:
ByteAccessor

@Inclubating
public class AlignByteAccessor
extends Object
Author:
Ardika Rommy Sanjaya
  • Constructor Summary

    Constructors 
    Constructor Description
    AlignByteAccessor()  
  • Method Summary

    Modifier and Type Method Description
    byte[] allocate​(int size)  
    byte getByte​(byte[] buffer, int index)  
    void getBytes​(byte[] srcBuf, int index, byte[] dstBuf, int dstIndex, int size)  
    int getInt​(byte[] buffer, int index)  
    int getIntLE​(byte[] buffer, int index)  
    long getLong​(byte[] buffer, int index)  
    long getLongLE​(byte[] buffer, int index)  
    short getShort​(byte[] buffer, int index)  
    short getShortLE​(byte[] buffer, int index)  
    ByteBuffer nioBuffer​(byte[] buffer, int offset, int length)  
    void setByte​(byte[] buffer, int index, int val)  
    void setBytes​(byte[] dstBuf, int index, byte[] srcBuf, int srcIndex, int size)  
    void setInt​(byte[] buffer, int index, int val)  
    void setIntLE​(byte[] buffer, int index, int val)  
    void setLong​(byte[] buffer, int index, long val)  
    void setLongLE​(byte[] buffer, int index, long val)  
    void setShort​(byte[] buffer, int index, int val)  
    void setShortLE​(byte[] buffer, int index, int val)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getShort

      public short getShort​(byte[] buffer, int index)
    • getShortLE

      public short getShortLE​(byte[] buffer, int index)
    • getInt

      public int getInt​(byte[] buffer, int index)
    • getIntLE

      public int getIntLE​(byte[] buffer, int index)
    • getLong

      public long getLong​(byte[] buffer, int index)
    • getLongLE

      public long getLongLE​(byte[] buffer, int index)
    • setShort

      public void setShort​(byte[] buffer, int index, int val)
    • setShortLE

      public void setShortLE​(byte[] buffer, int index, int val)
    • setInt

      public void setInt​(byte[] buffer, int index, int val)
    • setIntLE

      public void setIntLE​(byte[] buffer, int index, int val)
    • setLong

      public void setLong​(byte[] buffer, int index, long val)
    • setLongLE

      public void setLongLE​(byte[] buffer, int index, long val)
    • allocate

      public byte[] allocate​(int size)
      Specified by:
      allocate in interface ByteAccessor
    • getByte

      public byte getByte​(byte[] buffer, int index)
      Specified by:
      getByte in interface ByteAccessor
    • nioBuffer

      public ByteBuffer nioBuffer​(byte[] buffer, int offset, int length)
      Specified by:
      nioBuffer in interface ByteAccessor
    • getBytes

      public void getBytes​(byte[] srcBuf, int index, byte[] dstBuf, int dstIndex, int size)
      Specified by:
      getBytes in interface ByteAccessor
    • setByte

      public void setByte​(byte[] buffer, int index, int val)
      Specified by:
      setByte in interface ByteAccessor
    • setBytes

      public void setBytes​(byte[] dstBuf, int index, byte[] srcBuf, int srcIndex, int size)
      Specified by:
      setBytes in interface ByteAccessor