Java ByteBuffer Write writeSlice(ByteBuffer src, int number, ByteBuffer dst)

Here you can find the source of writeSlice(ByteBuffer src, int number, ByteBuffer dst)

Description

write Slice

License

MIT License

Declaration

public static void writeSlice(ByteBuffer src, int number, ByteBuffer dst) 

Method Source Code

//package com.java2s;
// Licensed under the MIT License:

import java.nio.ByteBuffer;

public class Main {
    public static void writeSlice(ByteBuffer src, int number, ByteBuffer dst) { //writes a slice of an input buffer to an output buffer 
        ByteBuffer slice = src.slice();
        slice.limit(number);// w ww.  ja va2 s .c om
        dst.put(slice);
    }
}

Related

  1. writeResBit15(int value, ByteBuffer toBuffer)
  2. writeShortString(ByteBuffer buffer, String s)
  3. writeSign(ByteBuffer bb)
  4. writeSignedVarint(ByteBuffer buffer, int val)
  5. writeSize(final int s, ByteBuffer buffer)
  6. writeString(ByteBuffer buf, String s)
  7. writeString(ByteBuffer buf, String str)
  8. writeString(ByteBuffer buf, String value)
  9. writeString(ByteBuffer buffer, String string)