Created
November 25, 2017 09:29
-
-
Save valentyn-zaitsev/501e877f945585ae8a20262789b3a735 to your computer and use it in GitHub Desktop.
Double to Byte array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static byte[] doubleToByteArray(double value) { | |
byte[] bytes = new byte[8]; | |
ByteBuffer.wrap(bytes).putDouble(value); | |
return bytes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment