org.ogf.saga.buffer
Class BufferFactory

java.lang.Object
  extended by org.ogf.saga.buffer.BufferFactory

public abstract class BufferFactory
extends Object

Factory for creating buffers.


Constructor Summary
BufferFactory()
           
 
Method Summary
static Buffer createBuffer()
          Creates a (implementation-managed) buffer.
static Buffer createBuffer(byte[] data)
          Creates a (application-allocated) buffer.
static Buffer createBuffer(int size)
          Creates a (implementation-managed) buffer of the specified size.
static Buffer createBuffer(String sagaFactoryClassname)
          Creates a (implementation-managed) buffer.
static Buffer createBuffer(String sagaFactoryClassname, byte[] data)
          Creates a (application-allocated) buffer.
static Buffer createBuffer(String sagaFactoryClassname, int size)
          Creates a (implementation-managed) buffer of the specified size.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferFactory

public BufferFactory()
Method Detail

createBuffer

public static Buffer createBuffer(byte[] data)
                           throws BadParameterException,
                                  NoSuccessException
Creates a (application-allocated) buffer. The size is implicit in the size of the specified array.

Parameters:
data - the storage.
Returns:
the buffer.
Throws:
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.
BadParameterException - is thrown when the implementation cannot handle the specified data buffer.

createBuffer

public static Buffer createBuffer(String sagaFactoryClassname,
                                  byte[] data)
                           throws BadParameterException,
                                  NoSuccessException
Creates a (application-allocated) buffer. The size is implicit in the size of the specified array.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
data - the storage.
Returns:
the buffer.
Throws:
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.
BadParameterException - is thrown when the implementation cannot handle the specified data buffer.

createBuffer

public static Buffer createBuffer(int size)
                           throws BadParameterException,
                                  NoSuccessException
Creates a (implementation-managed) buffer of the specified size.

Parameters:
size - the size.
Returns:
the buffer.
Throws:
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.
BadParameterException - is thrown when the implementation cannot handle the specified size.

createBuffer

public static Buffer createBuffer(String sagaFactoryClassname,
                                  int size)
                           throws BadParameterException,
                                  NoSuccessException
Creates a (implementation-managed) buffer of the specified size.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
size - the size.
Returns:
the buffer.
Throws:
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.
BadParameterException - is thrown when the implementation cannot handle the specified size.

createBuffer

public static Buffer createBuffer()
                           throws BadParameterException,
                                  NoSuccessException
Creates a (implementation-managed) buffer.

Returns:
the buffer.
Throws:
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.
BadParameterException - is thrown when the defaults are not suitable.

createBuffer

public static Buffer createBuffer(String sagaFactoryClassname)
                           throws BadParameterException,
                                  NoSuccessException
Creates a (implementation-managed) buffer.

Parameters:
sagaFactoryClassname - the class name of the Saga factory to be used.
Returns:
the buffer.
Throws:
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.
BadParameterException - is thrown when the defaults are not suitable.


The SAGA Java language bindings, version-1.1.1