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
9
10
11
12
13
14
15
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 }