X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=third-party%2Fopenflow-codec%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fcodec%2Fio%2FDataBuffers.java;fp=third-party%2Fopenflow-codec%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fcodec%2Fio%2FDataBuffers.java;h=0000000000000000000000000000000000000000;hb=64fe0fbca1a6c2b77ad25f568d73a7eb64236d16;hp=38bbc74551635d2f71057b59bae9cec7df59cf3e;hpb=8b9a3ff2bbc83941254b46b818cbbae5cc1a3a5b;p=openflowjava.git diff --git a/third-party/openflow-codec/src/main/java/org/openflow/codec/io/DataBuffers.java b/third-party/openflow-codec/src/main/java/org/openflow/codec/io/DataBuffers.java deleted file mode 100644 index 38bbc745..00000000 --- a/third-party/openflow-codec/src/main/java/org/openflow/codec/io/DataBuffers.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.openflow.codec.io; - -import java.nio.ByteBuffer; - -/** - * Creates a new IDataBuffer by allocating new space. DataBuffers is responsible - * to create buffer class that will used by test cases. currently it instantiate - * ByteDataBuffer (java's ByteBuffer) but it can be updated to support other - * data buffer in future. - * - * @author AnilGujele - * - */ -public final class DataBuffers { - /** - * private constructor to protect instantiation - */ - private DataBuffers() { - - } - - /** - * get a new data buffer. - * - * @param capacity - * The new buffer's capacity, in bytes - * - * @return The new data buffer - * - * @throws IllegalArgumentException - * If the capacity is a negative integer - */ - public static IDataBuffer allocate(int capacity) { - - ByteBuffer bytebuffer = ByteBuffer.allocateDirect(capacity); - ByteDataBuffer dataBuffer = new ByteDataBuffer(bytebuffer); - return dataBuffer; - } -}