public static DataBuffer createBuffer(int dataType, int size, int numBanks) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte(size, numBanks); case DataBuffer.TYPE_USHORT : return new DataBufferUShort(size, numBanks); case DataBuffer.TYPE_INT : return new DataBufferInt(size, numBanks); default : throw new UnsupportedOperationException(); }
public static DataBuffer createBuffer(int dataType, Object data, int size) { if (data == null) return createBuffer(dataType, size, 1);  return createBufferFromData(dataType, data, size);
	public static DataBuffer createBuffer(int dataType, int size, int numBanks) {		switch (dataType) {			case DataBuffer.TYPE_BYTE :				return new DataBufferByte(size, numBanks);			case DataBuffer.TYPE_USHORT :				return new DataBufferUShort(size, numBanks);			case DataBuffer.TYPE_INT :				return new DataBufferInt(size, numBanks);			default :				throw new UnsupportedOperationException();		}	}