public class ByteBufferUtil extends Object
Constructor and Description |
---|
ByteBufferUtil() |
Modifier and Type | Method and Description |
---|---|
static ByteArrayInputStream |
toByteArrayInputStream(ByteBuffer buffer) |
static ByteBuffer |
toByteBuffers(ByteSequence bs) |
static List<ByteBuffer> |
toByteBuffers(Collection<byte[]> bytesList) |
static byte[] |
toBytes(ByteBuffer buffer) |
static List<byte[]> |
toBytesList(Collection<ByteBuffer> bytesList) |
static String |
toString(ByteBuffer bytes) |
static org.apache.hadoop.io.Text |
toText(ByteBuffer byteBuffer) |
static void |
write(DataOutput out,
ByteBuffer buffer) |
public static byte[] toBytes(ByteBuffer buffer)
public static List<ByteBuffer> toByteBuffers(Collection<byte[]> bytesList)
public static List<byte[]> toBytesList(Collection<ByteBuffer> bytesList)
public static org.apache.hadoop.io.Text toText(ByteBuffer byteBuffer)
public static String toString(ByteBuffer bytes)
public static ByteBuffer toByteBuffers(ByteSequence bs)
public static void write(DataOutput out, ByteBuffer buffer) throws IOException
IOException
public static ByteArrayInputStream toByteArrayInputStream(ByteBuffer buffer)
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.