Top Description Inners Fields Constructors Methods
com.amazon.ion.impl

pack-priv final Class SimpleByteBuffer

extends Object
implements ByteBuffer
Class Inheritance
All Implemented Interfaces
com.amazon.ion.impl.ByteBuffer
Imports
com.amazon.ion.Decimal, .IonException, .Timestamp, .Timestamp.Precision, java.io.IOException, .OutputStream, java.math.BigDecimal, .BigInteger, .MathContext

Manages a very simple byte buffer that is a single contiguous byte array, without resize ability.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv byte[]
pack-priv int
pack-priv boolean
pack-priv int

Constructor Summary

AccessConstructor and Description
public
SimpleByteBuffer(byte[]
assumed to be owned by this new instance.
bytes
)

Creates a read-write buffer.

public
SimpleByteBuffer(byte[]
assumed to be owned by this new instance.
bytes
,
boolean isReadOnly)

public
SimpleByteBuffer(byte[]
assumed to be owned by this new instance.
bytes
,
int start, int length)

Creates a read-write buffer.

public
SimpleByteBuffer(byte[]
assumed to be owned by this new instance.
bytes
,
int start, int length, boolean isReadOnly)

Method Summary

Modifier and TypeMethod and Description
public byte[]
getBytes()

Implements com.amazon.ion.impl.ByteBuffer.getBytes.

Makes a copy of the internal byte array.

public int
getBytes(byte[]
users byte array to copy into
buffer
,
int
first byte of the array to use
offset
,
int
length of the byte array available to copy into
length
)

Implements com.amazon.ion.impl.ByteBuffer.getBytes.

copies the contents of the buffer into a user supplied byte array.

public int
public ByteReader
getReader()

Implements com.amazon.ion.impl.ByteBuffer.getReader.

creates a reader and sets it to the beginning of the buffer under managment here for use.

public ByteWriter
getWriter()

Implements com.amazon.ion.impl.ByteBuffer.getWriter.

creates a writer and sets it to the beginning of the buffer under managment here for use.

public void
writeBytes(OutputStream
stream to write into
out
)

Implements com.amazon.ion.impl.ByteBuffer.writeBytes.

copies the contents of the buffer into and output stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait