Here you can find the source of serializeInt(OutputStream out, Integer data)
public static void serializeInt(OutputStream out, Integer data)
//package com.java2s; /* /*from w w w . j av a 2s .c om*/ * This file is part of the HyperGraphDB source distribution. This is copyrighted * software. For permitted uses, licensing options and redistribution, please see * the LicensingInformation file at the root level of the distribution. * * Copyright (c) 2005-2010 Kobrix Software, Inc. All rights reserved. */ import java.io.IOException; import java.io.OutputStream; public class Main { public static void serializeInt(OutputStream out, Integer data) { // assume not null try { int v = ((Integer) data).intValue(); out.write((byte) ((v >>> 24) & 0xFF)); out.write((byte) ((v >>> 16) & 0xFF)); out.write((byte) ((v >>> 8) & 0xFF)); out.write((byte) ((v >>> 0) & 0xFF)); } catch (IOException ex) { ex.printStackTrace(); } } }