Java ByteBuffer Write writeLong(long v, ByteBuffer buffer)

Here you can find the source of writeLong(long v, ByteBuffer buffer)

Description

write Long

License

Open Source License

Declaration

public static void writeLong(long v, 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 void writeLong(long v, ByteBuffer buffer) throws IOException {
        buffer.order(ByteOrder.LITTLE_ENDIAN);
        buffer.putLong(v);//from   w  w w . ja v a  2 s  . co m
        buffer.order(ByteOrder.BIG_ENDIAN);
    }
}

Related

  1. writeLen(int len, ByteBuffer dest, int dOff)
  2. writeLength(ByteBuffer buffer, long l)
  3. writeLong(ByteBuffer buf, long value, int len)
  4. writeLong(ByteBuffer logBuf, long l)
  5. writeLong(long num, ByteBuffer out)
  6. writeLTriad(int triad, ByteBuffer bb)
  7. writeNullTerminatedString(ByteBuffer buf, String s, String encoding)
  8. writePackageName(ByteBuffer buffer, String packageName)
  9. writeRemaining(WritableByteChannel channel, ByteBuffer buffer)