public static LittleEndien getStream(byte[] buffer) { return new LittleEndien(new DataInputStream(new ByteArrayInputStream(buffer))); }
public Image load(InputStream stream) throws IOException { in = new LittleEndien(stream); loadHeader(); ArrayList<ByteBuffer> data = readData(false); return new Image(pixelFormat, width, height, depth, data, sizes, ColorSpace.sRGB); }
bis = new BufferedInputStream(stream); if (format == RawHeightMap.FORMAT_16BITLE) { LittleEndien dis = new LittleEndien(bis); int index;
in = new LittleEndien(stream);
ArrayList<byte[]> icons; DataInput leIn = new LittleEndien(inStream); int riff = leIn.readInt(); if (riff == 0x46464952) { // RIFF
@Override public Object load(AssetInfo assetInfo) throws IOException { data.clear(); LittleEndien stream = new LittleEndien(new DataInputStream(assetInfo.openStream())); int magic = stream.readInt(); int version = stream.readInt(); int length = stream.readInt(); byte[] json = null; //length is the total size, we have to remove the header size (3 integers = 12 bytes). length -= 12; while (length > 0) { int chunkLength = stream.readInt(); int chunkType = stream.readInt(); if (chunkType == JSON_TYPE) { json = new byte[chunkLength]; stream.read(json); } else { byte[] bin = new byte[chunkLength]; stream.read(bin); data.add(bin); } //8 is the byte size of the 2 ints chunkLength and chunkType. length -= chunkLength + 8; } return loadFromStream(assetInfo, new ByteArrayInputStream(json)); }
public Object load(AssetInfo info) throws IOException { if (!(info.getKey() instanceof TextureKey)) { throw new IllegalArgumentException("Texture assets must be loaded using a TextureKey"); } InputStream stream = null; try { stream = info.openStream(); in = new LittleEndien(stream); loadHeader(); if (texture3D) { ((TextureKey) info.getKey()).setTextureTypeHint(Texture.Type.ThreeDimensional); } else if (depth > 1) { ((TextureKey) info.getKey()).setTextureTypeHint(Texture.Type.CubeMap); } ArrayList<ByteBuffer> data = readData(((TextureKey) info.getKey()).isFlipY()); return new Image(pixelFormat, width, height, depth, data, sizes, ColorSpace.sRGB); } finally { if (stream != null){ stream.close(); } } }
public static LittleEndien getStream(byte[] buffer) { return new LittleEndien(new DataInputStream(new ByteArrayInputStream(buffer))); }
public Image load(InputStream stream) throws IOException { in = new LittleEndien(stream); loadHeader(); ArrayList<ByteBuffer> data = readData(false); return new Image(pixelFormat, width, height, depth, data, sizes, ColorSpace.sRGB); }
public Image load(InputStream stream) throws IOException { in = new LittleEndien(stream); loadHeader(); ArrayList<ByteBuffer> data = readData(false); return new Image(pixelFormat, width, height, depth, data, sizes); }
bis = new BufferedInputStream(stream); if (format == RawHeightMap.FORMAT_16BITLE) { LittleEndien dis = new LittleEndien(bis); int index;
in = new LittleEndien(stream);
ArrayList<byte[]> icons; DataInput leIn = new LittleEndien(inStream); int riff = leIn.readInt(); if (riff == 0x46464952) { // RIFF
@Override public Object load(AssetInfo assetInfo) throws IOException { LittleEndien stream = new LittleEndien(new DataInputStream(assetInfo.openStream())); int magic = stream.readInt(); int version = stream.readInt(); int length = stream.readInt(); byte[] json = null; //length is the total size, we have to remove the header size (3 integers = 12 bytes). length -= 12; while (length > 0) { int chunkLength = stream.readInt(); int chunkType = stream.readInt(); if (chunkType == JSON_TYPE) { json = new byte[chunkLength]; stream.read(json); } else { byte[] bin = new byte[chunkLength]; stream.read(bin); data.add(bin); } //8 is the byte size of the 2 ints chunkLength and chunkType. length -= chunkLength + 8; } return loadFromStream(assetInfo, new ByteArrayInputStream(json)); }
public Object load(AssetInfo info) throws IOException { if (!(info.getKey() instanceof TextureKey)) { throw new IllegalArgumentException("Texture assets must be loaded using a TextureKey"); } InputStream stream = null; try { stream = info.openStream(); in = new LittleEndien(stream); loadHeader(); if (texture3D) { ((TextureKey) info.getKey()).setTextureTypeHint(Type.ThreeDimensional); } else if (depth > 1) { ((TextureKey) info.getKey()).setTextureTypeHint(Type.CubeMap); } ArrayList<ByteBuffer> data = readData(((TextureKey) info.getKey()).isFlipY()); return new Image(pixelFormat, width, height, depth, data, sizes); } finally { if (stream != null){ stream.close(); } } }
public Object load(AssetInfo info) throws IOException { if (!(info.getKey() instanceof TextureKey)) { throw new IllegalArgumentException("Texture assets must be loaded using a TextureKey"); } InputStream stream = null; try { stream = info.openStream(); in = new LittleEndien(stream); loadHeader(); if (texture3D) { ((TextureKey) info.getKey()).setTextureTypeHint(Texture.Type.ThreeDimensional); } else if (depth > 1) { ((TextureKey) info.getKey()).setTextureTypeHint(Texture.Type.CubeMap); } ArrayList<ByteBuffer> data = readData(((TextureKey) info.getKey()).isFlipY()); return new Image(pixelFormat, width, height, depth, data, sizes, ColorSpace.sRGB); } finally { if (stream != null){ stream.close(); } } }
private AudioData load(InputStream inputStream, boolean stream) throws IOException{ this.in = new LittleEndien(inputStream);