Here you can find the source of writeInt(ByteBuffer logBuf, int i)
public static void writeInt(ByteBuffer logBuf, int i)
//package com.java2s; /*-//from ww w . j a v a2 s.com * See the file LICENSE for redistribution information. * * Copyright (c) 2002-2010 Oracle. All rights reserved. * */ import java.nio.ByteBuffer; public class Main { /** * Write an int into the log. */ public static void writeInt(ByteBuffer logBuf, int i) { byte b = (byte) ((i >> 0) & 0xff); logBuf.put(b); b = (byte) ((i >> 8) & 0xff); logBuf.put(b); b = (byte) ((i >> 16) & 0xff); logBuf.put(b); b = (byte) ((i >> 24) & 0xff); logBuf.put(b); } }