Here you can find the source of parseToByteBuffer(Object value)
public static ByteBuffer parseToByteBuffer(Object value)
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.nio.ByteBuffer; public class Main { public static ByteBuffer parseToByteBuffer(Object value) { if (value == null) { return null; }/*w w w .ja va 2s. c o m*/ if (value instanceof ByteBuffer) { return (ByteBuffer) value; } else { return ByteBuffer.wrap(value.toString().getBytes()); } } }