Methods Summary |
---|
public void | addContents(DexFile file){@inheritDoc}
// Nothing to do here.
|
protected int | compareTo0(OffsettedItem other){@inheritDoc}
StringDataItem otherData = (StringDataItem) other;
return value.compareTo(otherData.value);
|
public ItemType | itemType(){@inheritDoc}
return ItemType.TYPE_STRING_DATA_ITEM;
|
public java.lang.String | toHuman(){@inheritDoc}
return value.toQuoted();
|
private static int | writeSize(com.android.dexgen.rop.cst.CstUtf8 value)Gets the write size for a given value.
int utf16Size = value.getUtf16Size();
// The +1 is for the '\0' termination byte.
return Leb128Utils.unsignedLeb128Size(utf16Size)
+ value.getUtf8Size() + 1;
|
public void | writeTo0(DexFile file, com.android.dexgen.util.AnnotatedOutput out){@inheritDoc}
ByteArray bytes = value.getBytes();
int utf16Size = value.getUtf16Size();
if (out.annotates()) {
out.annotate(Leb128Utils.unsignedLeb128Size(utf16Size),
"utf16_size: " + Hex.u4(utf16Size));
out.annotate(bytes.size() + 1, value.toQuoted());
}
out.writeUnsignedLeb128(utf16Size);
out.write(bytes);
out.writeByte(0);
|