Here you can find the source of readLong(final DataInputStream in)
Parameter | Description |
---|---|
in | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
public static Long readLong(final DataInputStream in) throws IOException
//package com.java2s; /******************************************************************************* * SaveableLib is Copyright 2012 by Pedro M. * //from ww w . ja v a 2 s . co m * This file is part of SaveableLib. * * SaveableLib 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 3 of the License, or (at your option) * any later version. * * SaveableLib 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. * * Commercial Distribution License * If you would like to distribute SaveableLib (or portions thereof) under a * license other than the "GNU Lesser General Public License, version 3", please * contact Pedro M (pedro.pub@free.fr). * * You should have received a copy of the GNU Lesser General Public License * along with SaveableLib. If not, see <http://www.gnu.org/licenses/>. ******************************************************************************/ import java.io.DataInputStream; import java.io.IOException; public class Main { /** * * @param in * @return * @throws IOException */ public static Long readLong(final DataInputStream in) throws IOException { final long read = in.readLong(); return (read == Long.MIN_VALUE ? null : Long.valueOf(read)); } }