Here you can find the source of putNullTerminal(ByteBuffer buffer)
ByteBuffer
object.
Parameter | Description |
---|---|
buffer | a destination buffer for the String. |
public static void putNullTerminal(ByteBuffer buffer)
//package com.java2s; /**//from w w w.ja v a 2s . c o m * NativeFmodEx Project * * Want to use FMOD Ex API (www.fmod.org) in the Java language ? NativeFmodEx is made for you. * Copyright ? 2005-2010 J?r?me JOUVIE (Jouvieje) * * Created on 23 feb. 2005 * @version file v1.5.0 * @author J?r?me JOUVIE (Jouvieje) * @site http://jerome.jouvie.free.fr/ * @mail jerome.jouvie@gmail.com * * INTRODUCTION * FMOD Ex is a music and sound effects system, by Firelight Technologies Pty, Ltd. * More informations can be found at: * http://www.fmod.org/ * The aim of this project is to provide a java interface for this amazing sound API. * * * GNU LESSER GENERAL PUBLIC LICENSE * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of the License, * or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the * Free Software Foundation, Inc., * 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA */ import java.nio.ByteBuffer; public class Main { /** * Relative put operation.<BR> * Write a <i>NULL terminal character</i> in a <code>ByteBuffer</code> object. * @param buffer a destination buffer for the String. */ public static void putNullTerminal(ByteBuffer buffer) { buffer.put((byte) 0); } }