Java ByteBuffer from toByteBuffer(BigDecimal decimal)

Here you can find the source of toByteBuffer(BigDecimal decimal)

Description

to Byte Buffer

License

Open Source License

Declaration

public static ByteBuffer toByteBuffer(BigDecimal decimal) 

Method Source Code


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

import java.math.BigDecimal;

import java.nio.ByteBuffer;

public class Main {
    public static ByteBuffer toByteBuffer(BigDecimal decimal) {
        return ByteBuffer.wrap(decimal.unscaledValue().toByteArray());
    }/*from   w  w w .  jav a 2s .co m*/
}

Related

  1. getByteBufferFromUUID(java.util.UUID uuid)
  2. getByteBufferOutputStream(final ByteBuffer buf)
  3. getByteBufferReadMethod(Class clazz)
  4. getByteBuffers(Collection newValue)
  5. getByteBufferUtf8(final String string)