Here you can find the source of putString(String name, ByteBuffer buffer)
Parameter | Description |
---|---|
name | a parameter |
buffer | a parameter |
public static void putString(String name, ByteBuffer buffer)
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; public class Main { public static void putString(String string, OutputStream out) throws IOException { out.write(string.getBytes());/*www. j a v a 2 s . c o m*/ out.write(0); } /** * @param name * @param buffer */ public static void putString(String name, ByteBuffer buffer) { buffer.put(name.getBytes()).put((byte) 0); } }