public final class DataSegmentFactory extends Object
This factory creates a instance to a DataSegment object.
| Modifier and Type | Class and Description |
|---|---|
static class |
DataSegmentFactory.DataSegmentFormat
This enumeration defines the valid stati of the data segment.
|
| Modifier and Type | Method and Description |
|---|---|
static IDataSegment |
create(ByteBuffer buffer,
DataSegmentFactory.DataSegmentFormat format,
int maxChunkSize)
Creates a data segment of the given format and with the given chunk size
(in bytes).
|
static IDataSegment |
create(ByteBuffer buffer,
int position,
int length,
DataSegmentFactory.DataSegmentFormat format,
int maxChunkSize)
Creates a data segment of the given format and with the given chunk size
(in bytes).
|
static IDataSegment |
create(DataSegmentFactory.DataSegmentFormat format,
int maxChunkSize)
Creates a data segment of the given format and with the given chunk size
(in bytes).
|
public static final IDataSegment create(ByteBuffer buffer, DataSegmentFactory.DataSegmentFormat format, int maxChunkSize)
buffer.buffer - The initialization buffer.format - A format from the DataSegmentFormat enumeration.maxChunkSize - The size (in bytes) of one chunk, which represents the MaxRecvDataSegmentLength
.DataSegment object.public static final IDataSegment create(ByteBuffer buffer, int position, int length, DataSegmentFactory.DataSegmentFormat format, int maxChunkSize)
buffer.buffer - The initialization buffer.position - The position of the variable buffer.length - The length (in bytes) to read from buffer.format - A format from the DataSegmentFormat enumeration.maxChunkSize - The size (in bytes) of one chunk, which represents the MaxRecvDataSegmentLength
.DataSegment object.public static final IDataSegment create(DataSegmentFactory.DataSegmentFormat format, int maxChunkSize)
format - A format from the DataSegmentFormat enumeration.maxChunkSize - The size (in bytes) of one chunk, which represents the MaxRecvDataSegmentLength
.DataSegment object.Copyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.