Java ByteBuffer Set redByteArray(ByteBuffer buffer, int offset, int length)

Here you can find the source of redByteArray(ByteBuffer buffer, int offset, int length)

Description

red Byte Array

License

Apache License

Declaration

public static byte[] redByteArray(ByteBuffer buffer, int offset,
        int length) 

Method Source Code

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

import java.nio.ByteBuffer;

public class Main {

    public static byte[] redByteArray(ByteBuffer buffer, int offset,
            int length) {
        byte[] dst = new byte[length];
        for (int i = 0; i < length; i++) {
            dst[i] = buffer.get(offset + i);
        }//from w  ww . j  a  v a  2s  .  c om
        return dst;
    }
}

Related

  1. readBitSet(ByteBuffer buf, int len)
  2. readBlock(ByteBuffer buffer, String fileName, long startOffset, Logger log)
  3. readFromChannel(FileChannel fc, ByteBuffer buffer, int bufferOffset, int num)
  4. readKey(ByteBuffer index, int indexByteOffset, byte[] foundKey)
  5. readPackageName(ByteBuffer buffer, int offset)
  6. redInteger1(ByteBuffer buffer, int _offset)
  7. redString(ByteBuffer buffer, int offset, Charset charset)
  8. releaseTemporaryDirectBuffer(ByteBuffer buf)
  9. reset(int offset, ByteBuffer b)