
jassimp.util.ByteArrayUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of assimp Show documentation
Show all versions of assimp Show documentation
Java porting of Open Asset Import Library
The newest version!
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package jassimp.util;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
/**
*
* @author elect
*/
public class ByteArrayUtil {
// public static int readInteger(byte[] bs, int offset) throws IOException {
// return readByteBuffer(bs, offset, 4).getInt();
// }
//
// public static float readFloat(byte[] bs, int offset) throws IOException {
// return readByteBuffer(bs, offset, 4).getFloat();
// }
//
// public static short readShort(byte[] bs, int offset) throws IOException {
// return readByteBuffer(bs, offset, 2).getShort();
// }
//
// public static byte readByte(byte[] bs, int offset) throws IOException {
// return readByteBuffer(bs, offset, 1).get();
// }
//
// public static ByteBuffer readByteBuffer(byte[] bs, int offset, int length) throws IOException {
// ByteBuffer byteBuffer = ByteBuffer.wrap(bs, offset, length);
// return byteBuffer.order(ByteOrder.nativeOrder());
// }
//
// public static String readString(byte[] bs, int offset, int length) throws IOException {
// return new String(bs, offset, length, Charset.forName("UTF-8"));
// }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy