org.jnetpcap.nio
Class JMappedBuffer

java.lang.Object
  extended by org.jnetpcap.nio.JMappedBuffer
All Implemented Interfaces:
JByteBuffer

public class JMappedBuffer
extends java.lang.Object
implements JByteBuffer

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Constructor Summary
JMappedBuffer()
           
JMappedBuffer(int start, JBuffer... bufs)
           
JMappedBuffer(JBuffer... bufs)
           
 
Method Summary
 int add(int start, JBuffer... bufs)
           
 int add(JBuffer buf, int start)
           
 int add(JBuffer buf, int start, int offset)
           
 int add(JBuffer buf, int start, int length, int offset)
           
 byte getByte(int index)
           
 byte[] getByteArray(int index, byte[] array)
           
 byte[] getByteArray(int index, int size)
           
 double getDouble(int index)
           
 float getFloat(int index)
           
 int getInt(int index)
           
 long getLong(int index)
           
 short getShort(int index)
           
 int getUByte(int index)
           
 long getUInt(int index)
           
 int getUShort(int index)
           
 java.nio.ByteOrder order()
           
 void order(java.nio.ByteOrder order)
           
 boolean remove(int offset)
           
 void setByte(int index, byte value)
           
 void setByteArray(int index, byte[] array)
           
 void setDouble(int index, double value)
           
 void setFloat(int index, float value)
           
 void setInt(int index, int value)
           
 void setLong(int index, long value)
           
 void setShort(int index, short value)
           
 void setUByte(int index, int value)
           
 void setUInt(int index, long value)
           
 void setUShort(int index, int value)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMappedBuffer

public JMappedBuffer()

JMappedBuffer

public JMappedBuffer(int start,
                     JBuffer... bufs)

JMappedBuffer

public JMappedBuffer(JBuffer... bufs)
Method Detail

add

public int add(int start,
               JBuffer... bufs)

add

public int add(JBuffer buf,
               int start)

add

public int add(JBuffer buf,
               int start,
               int offset)

add

public int add(JBuffer buf,
               int start,
               int length,
               int offset)
Parameters:
buf -
start - offset into the mapped buffer - starting sequence number
length - length from the start into the buffer
offset - offset into the supplied buffer
Returns:

getByte

public byte getByte(int index)
Specified by:
getByte in interface JByteBuffer

getByteArray

public byte[] getByteArray(int index,
                           byte[] array)
Specified by:
getByteArray in interface JByteBuffer

getByteArray

public byte[] getByteArray(int index,
                           int size)
Specified by:
getByteArray in interface JByteBuffer

getDouble

public double getDouble(int index)
Specified by:
getDouble in interface JByteBuffer

getFloat

public float getFloat(int index)
Specified by:
getFloat in interface JByteBuffer

getInt

public int getInt(int index)
Specified by:
getInt in interface JByteBuffer

getLong

public long getLong(int index)
Specified by:
getLong in interface JByteBuffer

getShort

public short getShort(int index)
Specified by:
getShort in interface JByteBuffer

getUByte

public int getUByte(int index)
Specified by:
getUByte in interface JByteBuffer

getUInt

public long getUInt(int index)
Specified by:
getUInt in interface JByteBuffer

getUShort

public int getUShort(int index)
Specified by:
getUShort in interface JByteBuffer

remove

public boolean remove(int offset)

setByte

public void setByte(int index,
                    byte value)
Specified by:
setByte in interface JByteBuffer

setByteArray

public void setByteArray(int index,
                         byte[] array)
Specified by:
setByteArray in interface JByteBuffer

setDouble

public void setDouble(int index,
                      double value)
Specified by:
setDouble in interface JByteBuffer

setFloat

public void setFloat(int index,
                     float value)
Specified by:
setFloat in interface JByteBuffer

setInt

public void setInt(int index,
                   int value)
Specified by:
setInt in interface JByteBuffer

setLong

public void setLong(int index,
                    long value)
Specified by:
setLong in interface JByteBuffer

setShort

public void setShort(int index,
                     short value)
Specified by:
setShort in interface JByteBuffer

setUByte

public void setUByte(int index,
                     int value)
Specified by:
setUByte in interface JByteBuffer

setUInt

public void setUInt(int index,
                    long value)
Specified by:
setUInt in interface JByteBuffer

setUShort

public void setUShort(int index,
                      int value)
Specified by:
setUShort in interface JByteBuffer

size

public int size()
Specified by:
size in interface JByteBuffer

order

public java.nio.ByteOrder order()
Specified by:
order in interface JByteBuffer

order

public void order(java.nio.ByteOrder order)
Specified by:
order in interface JByteBuffer