Package org.apache.qpid.proton.codec

# Class WritableBuffer.ByteBufferWrapper

java.lang.Object
org.apache.qpid.proton.codec.WritableBuffer.ByteBufferWrapper

All Implemented Interfaces:
  `WritableBuffer`

Enclosing interface:
  WritableBuffer

public static class WritableBuffer.ByteBufferWrapper extends Object implements WritableBuffer

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.apache.qpid.proton.codec.WritableBuffer

`WritableBuffer.ByteBufferWrapper`

## Constructor Summary

Constructors
Constructor
Description
`ByteBufferWrapper(ByteBuffer buf)`

## Method Summary

Modifier and Type
Method
Description
`static WritableBuffer.ByteBufferWrapper`
`allocate(int size)`
`ByteBuffer`
`byteBuffer()`
`void`
`ensureRemaining(int remaining)`
`boolean`
`hasRemaining()`
`int`
`limit()`
`int`
`position()`
`void`
`position(int position)`
`void`
`put(byte b)`
`void`
`put(byte[] src, int offset, int length)`
`void`
`put(String value)`
`void`
`put(ByteBuffer src)`
`void`
`put(ReadableBuffer src)`
`void`
`putDouble(double d)`
`void`
`putFloat(float f)`
`void`
`putInt(int i)`
`void`
`putLong(long l)`
`void`
`putShort(short s)`
`int`
`remaining()`
`ReadableBuffer`
`toReadableBuffer()`
`String`
`toString()`
`static WritableBuffer.ByteBufferWrapper`
`wrap(byte[] bytes)`
`static WritableBuffer.ByteBufferWrapper`
`wrap(ByteBuffer buffer)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ByteBufferWrapper

public ByteBufferWrapper(ByteBuffer buf)

## Method Details

### put

public void put(byte b)

Specified by:
  `put` in interface `WritableBuffer`

### putFloat

public void putFloat(float f)

Specified by:
  `putFloat` in interface `WritableBuffer`

### putDouble

public void putDouble(double d)

Specified by:
  `putDouble` in interface `WritableBuffer`

### put

public void put(byte[] src, int offset, int length)

Specified by:
  `put` in interface `WritableBuffer`

### putShort

public void putShort(short s)

Specified by:
  `putShort` in interface `WritableBuffer`

### putInt

public void putInt(int i)

Specified by:
  `putInt` in interface `WritableBuffer`

### putLong

public void putLong(long l)

Specified by:
  `putLong` in interface `WritableBuffer`

### hasRemaining

public boolean hasRemaining()

Specified by:
  `hasRemaining` in interface `WritableBuffer`

### ensureRemaining

public void ensureRemaining(int remaining)

Specified by:
  `ensureRemaining` in interface `WritableBuffer`

### remaining

public int remaining()

Specified by:
  `remaining` in interface `WritableBuffer`

### position

public int position()

Specified by:
  `position` in interface `WritableBuffer`

### position

public void position(int position)

Specified by:
  `position` in interface `WritableBuffer`

### put

public void put(ByteBuffer src)

Specified by:
  `put` in interface `WritableBuffer`

### put

public void put(ReadableBuffer src)

Specified by:
  `put` in interface `WritableBuffer`

### put

public void put(String value)

Specified by:
  `put` in interface `WritableBuffer`

### limit

public int limit()

Specified by:
  `limit` in interface `WritableBuffer`

### byteBuffer

public ByteBuffer byteBuffer()

### toReadableBuffer

public ReadableBuffer toReadableBuffer()

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### allocate

public static WritableBuffer.ByteBufferWrapper allocate(int size)

### wrap

public static WritableBuffer.ByteBufferWrapper wrap(ByteBuffer buffer)

### wrap

public static WritableBuffer.ByteBufferWrapper wrap(byte[] bytes)