Here you can find the source of dumpBoolean(ByteBuffer itemBuffer, StringBuilder sb, String tag)
public static boolean dumpBoolean(ByteBuffer itemBuffer, StringBuilder sb, String tag)
//package com.java2s; /*-/*from www . ja v a 2 s . c o m*/ * See the file LICENSE for redistribution information. * * Copyright (c) 2002-2010 Oracle. All rights reserved. * */ import java.nio.ByteBuffer; public class Main { public static boolean dumpBoolean(ByteBuffer itemBuffer, StringBuilder sb, String tag) { sb.append("<"); sb.append(tag); sb.append(" exists = \""); boolean exists = readBoolean(itemBuffer); sb.append(exists); if (exists) { sb.append("\">"); } else { /* Close off the tag, we're done. */ sb.append("\"/>"); } return exists; } /** * Read a boolean from the log. */ public static boolean readBoolean(ByteBuffer logBuf) { byte val = logBuf.get(); return (val == (byte) 1) ? true : false; } }