Java ByteBuffer to Long readLong(ByteBuffer buffer)

Here you can find the source of readLong(ByteBuffer buffer)

Description

read Long

License

Open Source License

Declaration

public static long readLong(ByteBuffer buffer) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public class Main {
    public static long readLong(ByteBuffer buffer) throws IOException {
        buffer.order(ByteOrder.LITTLE_ENDIAN);
        long value = buffer.getLong();
        buffer.order(ByteOrder.BIG_ENDIAN);
        return value;
    }//www .  j  a  v a 2s . c o m
}

Related

  1. getUInt16(ByteBuffer buffer)
  2. getUInt32(ByteBuffer b)
  3. getUInt8(ByteBuffer b, int n)
  4. getUInteger(ByteBuffer bb)
  5. readLong(ByteBuffer buf, int length)
  6. readLong(ByteBuffer buffer)
  7. readLong(ByteBuffer in)
  8. readLong(ByteBuffer in, final int fitInBytes)
  9. readLong(ByteBuffer logBuf)