View Javadoc

1   package fr.in2p3.jsaga.impl.buffer;
2   
3   import org.ogf.saga.buffer.Buffer;
4   import org.ogf.saga.buffer.BufferFactory;
5   import org.ogf.saga.error.*;
6   
7   /* ***************************************************
8   * *** Centre de Calcul de l'IN2P3 - Lyon (France) ***
9   * ***             http://cc.in2p3.fr/             ***
10  * ***************************************************
11  * File:   BufferFactoryImpl
12  * Author: Sylvain Reynaud (sreynaud@in2p3.fr)
13  * Date:   17 sept. 2007
14  * ***************************************************
15  * Description:                                      */
16  /**
17   *
18   */
19  public class BufferFactoryImpl extends BufferFactory {
20      protected Buffer doCreateBuffer(byte[] data) throws BadParameterException, NoSuccessException {
21          return new ApplicationAllocatedBufferImpl(data);
22      }
23  
24      protected Buffer doCreateBuffer(int size) throws BadParameterException, NoSuccessException {
25          return new ImplementationAllocatedBufferImpl(size);
26      }
27  }