Java ByteBuffer to Int Array getIntWithChecksum(ByteBuffer buffer, Adler32 checksum)

Here you can find the source of getIntWithChecksum(ByteBuffer buffer, Adler32 checksum)

Description

get Int With Checksum

License

Apache License

Declaration

static int getIntWithChecksum(ByteBuffer buffer, Adler32 checksum) 

Method Source Code

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

import java.nio.ByteBuffer;

import java.util.zip.Adler32;

public class Main {
    static int getIntWithChecksum(ByteBuffer buffer, Adler32 checksum) {
        final int value = buffer.getInt();
        checksum.update(value);/* w  w  w .j  a  v a2  s .c  o m*/
        return value;
    }
}

Related

  1. getIntBE(final ByteBuffer b, final int start, final int end)
  2. getIntByteBuffer(int id)
  3. getIntegerFromBuffer(ByteBuffer buffer, int offset, int size)
  4. getIntFromBack(ByteBuffer bb)
  5. getIntFromByteBuffer(ByteBuffer data)
  6. readIntArray(ByteBuffer bb)
  7. readIntArray(ByteBuffer buf)
  8. readIntArray(ByteBuffer in)
  9. readIntegerArray(ByteBuffer bb, int length)