com.android.dex.util.ByteArrayByteInput Java Examples
The following examples show how to use
com.android.dex.util.ByteArrayByteInput.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Mutf8Test.java From buck with Apache License 2.0 | 5 votes |
public void testDecode() throws IOException { ByteInput in = new ByteArrayByteInput( new byte[] { 'A', 'B', 'C', (byte) 0xc0, (byte) 0x80, 0, 'E' }); assertEquals('A', in.readByte()); assertEquals("BC\u0000", Mutf8.decode(in, new char[3])); assertEquals('E', in.readByte()); }
Example #2
Source File: Leb128UtilsTest.java From buck with Apache License 2.0 | 5 votes |
public void testDecodeUnsignedLeb() throws IOException { assertEquals(0, Leb128.readUnsignedLeb128(new ByteArrayByteInput((byte) 0))); assertEquals(1, Leb128.readUnsignedLeb128(new ByteArrayByteInput((byte) 1))); assertEquals(127, Leb128.readUnsignedLeb128(new ByteArrayByteInput((byte) 0x7f))); assertEquals(16256, Leb128.readUnsignedLeb128( new ByteArrayByteInput((byte) 0x80, (byte) 0x7f))); }
Example #3
Source File: Leb128UtilsTest.java From buck with Apache License 2.0 | 5 votes |
public void testDecodeSignedLeb() throws IOException { assertEquals(0, Leb128.readSignedLeb128(new ByteArrayByteInput((byte) 0))); assertEquals(1, Leb128.readSignedLeb128(new ByteArrayByteInput((byte) 1))); assertEquals(-1, Leb128.readSignedLeb128(new ByteArrayByteInput((byte) 0x7f))); assertEquals(0x3c, Leb128.readSignedLeb128(new ByteArrayByteInput((byte) 0x3c))); assertEquals(-128, Leb128.readSignedLeb128( new ByteArrayByteInput((byte) 0x80, (byte) 0x7f))); }
Example #4
Source File: EncodedValue.java From Box with Apache License 2.0 | 4 votes |
public ByteInput asByteInput() { return new ByteArrayByteInput(data); }
Example #5
Source File: EncodedValue.java From Box with Apache License 2.0 | 4 votes |
public ByteInput asByteInput() { return new ByteArrayByteInput(data); }
Example #6
Source File: EncodedValue.java From J2ME-Loader with Apache License 2.0 | 4 votes |
public ByteInput asByteInput() { return new ByteArrayByteInput(data); }
Example #7
Source File: EncodedValue.java From aapt with Apache License 2.0 | 4 votes |
public ByteInput asByteInput() { return new ByteArrayByteInput(data); }
Example #8
Source File: EncodedValue.java From buck with Apache License 2.0 | 4 votes |
public ByteInput asByteInput() { return new ByteArrayByteInput(data); }