protected byte[] getBytes(int bufferIndex, String uri, Integer bufferLength) throws IOException {
        byte[] data;
        if (uri != null) {
            if (uri.startsWith("data:")) {
                // base 64 embed data
                data = Base64.getDecoder().decode(uri.substring(uri.indexOf(",") + 1));
            } else {
                // external file let's load it
                String decoded = decodeUri(uri);
                if (!decoded.endsWith(".bin")) {
                    throw new AssetLoadException(
                            "Cannot load " + decoded + ", a .bin extension is required.");
                }

                BinDataKey key = new BinDataKey(info.getKey().getFolder() + decoded);
                InputStream input = (InputStream) info.getManager().loadAsset(key);
                data = new byte[bufferLength];
                try (DataInputStream dataStream = new DataInputStream(input)) {
                    dataStream.readFully(data);
                }
            }
        } else {
            // no URI, this should not happen in a gltf file, only in glb files.
            throw new AssetLoadException("Buffer " + bufferIndex + " has no uri");
        }
        return data;
    }
GLTF 2.0 loader
Created by Nehon on 07/08/2017.
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfLoader.java