KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > bytes > TCByteBufferFactoryJDK13


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.bytes;
5
6 /**
7  * Factory for JDK13 style TCByteBuffer
8  *
9  * @author teck
10  */

11 class TCByteBufferFactoryJDK13 implements TCByteBufferFactoryIF {
12
13   final public TCByteBuffer getInstance(int capacity, boolean direct) {
14     return new TCByteBufferJDK13(capacity, direct);
15   }
16
17   public TCByteBuffer wrap(byte[] data) {
18     return new TCByteBufferJDK13(data);
19   }
20 }
Popular Tags