Java InputStream Read Long readLongLE(InputStream in)

Here you can find the source of readLongLE(InputStream in)

Description

read Long LE

License

LGPL

Declaration

public static long readLongLE(InputStream in) throws IOException 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.io.*;

public class Main {
    public static long readLongLE(InputStream in) throws IOException {
        long ret = -1;
        if (in != null) {
            ret = 0;//from   www .j  ava  2s  .  co  m
            for (int i = 0; i < 8; i++) {
                long i1 = in.read() & 0x0ff;
                ret += (i1 << (i * 8));
            }
        }
        return ret;
    }
}

Related

  1. readLong(InputStream stream)
  2. readLong(InputStream stream)
  3. readLong(InputStream stream)
  4. readLong(InputStream stream)
  5. readLongFrom(InputStream is)
  6. readLongLE(InputStream in)