Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Float to bytes java

int intBits =  Float.floatToIntBits(value);
byte[] bs = new byte[] {
      (byte) (intBits >> 24),
      (byte) (intBits >> 16),
      (byte) (intBits >> 8),
      (byte) (intBits)
};
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #Float #bytes #java
ADD COMMENT
Topic
Name
1+5 =