/** @inheritDoc */ public void write(int[] data) { for (int i : data) { writeInt(i); } }
/** @inheritDoc */ public void write(long[] data) { for (long l : data) { writeLong(l); } } }
/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }
public short[] transform(short[] encodedInstructions) throws DexException { DecodedInstruction[] decodedInstructions = DecodedInstruction.decodeAll(encodedInstructions); int size = decodedInstructions.length; mappedInstructions = new DecodedInstruction[size]; mappedAt = 0; reader.visitAll(decodedInstructions); ShortArrayCodeOutput out = new ShortArrayCodeOutput(size); for (DecodedInstruction instruction : mappedInstructions) { if (instruction != null) { instruction.encode(out); } } return out.getArray(); }
/** @inheritDoc */ public void write(long[] data) { for (long l : data) { writeLong(l); } } }
/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }
public short[] transform(short[] encodedInstructions) throws DexException { DecodedInstruction[] decodedInstructions = DecodedInstruction.decodeAll(encodedInstructions); int size = decodedInstructions.length; mappedInstructions = new DecodedInstruction[size]; mappedAt = 0; reader.visitAll(decodedInstructions); ShortArrayCodeOutput out = new ShortArrayCodeOutput(size); for (DecodedInstruction instruction : mappedInstructions) { if (instruction != null) { instruction.encode(out); } } return out.getArray(); }
/** {@inheritDoc} */ @Override public void write(long[] data) { for (long l : data) { writeLong(l); } } }
/** {@inheritDoc} */ @Override public void write(int[] data) { for (int i : data) { writeInt(i); } }
/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }
public short[] transform(IndexMap indexMap, short[] encodedInstructions) throws DexException { DecodedInstruction[] decodedInstructions = DecodedInstruction.decodeAll(encodedInstructions); int size = decodedInstructions.length; this.indexMap = indexMap; mappedInstructions = new DecodedInstruction[size]; mappedAt = 0; reader.visitAll(decodedInstructions); ShortArrayCodeOutput out = new ShortArrayCodeOutput(size); for (DecodedInstruction instruction : mappedInstructions) { if (instruction != null) { instruction.encode(out); } } this.indexMap = null; return out.getArray(); }
/** {@inheritDoc} */ public void write(long[] data) { for (long l : data) { writeLong(l); } } }
/** {@inheritDoc} */ @Override public void write(int[] data) { for (int i : data) { writeInt(i); } }
/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }