public class Output extends Object implements Constants, AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
char |
major |
char |
minor |
AE_CNST, AE_CNST_W, AE_CNST2_W, AE_FIELDREF, AE_I_D0, AE_I_D1, AE_I_F0, AE_I_F1, AE_I_F2, AE_I_I0, AE_I_I1, AE_I_I2, AE_I_I3, AE_I_I4, AE_I_I5, AE_I_IML, AE_I_L0, AE_I_L1, AE_I_LAST, AE_I_NULL, AE_IFMETHOD, AE_METHODREF, AE_REFTYPEREF, AE_S1, AE_S2, AE_U1, AE_U2, AE_U4, BRANCH, BYTE, CNST, CONSTANT_CLASS, CONSTANT_DOUBLE, CONSTANT_FIELDREF, CONSTANT_FLOAT, CONSTANT_INTEGER, CONSTANT_INTERFACEMETHODREF, CONSTANT_LONG, CONSTANT_METHODREF, CONSTANT_NAMEANDTYPE, CONSTANT_STRING, CONSTANT_UTF8, ERROR_STACK, FIELDREF, GETFIELD_STACK, GETSTATIC_STACK, IFMETHOD, IMPLICIT, INC, INVOKEINTERFACE_STACK, INVOKESPECIAL_STACK, INVOKESTATIC_STACK, INVOKEVIRTUAL_STACK, LDC_STACK, LS, LV, MAGIC, METHODREF, MULTIARRAY_STACK, PUTFIELD_STACK, PUTSTATIC_STACK, REFTYPEREF, RT, SIMPLE, SUCC_BRANCH, SUCC_GOTO, SUCC_JSR, SUCC_LOOKUPSWITCH, SUCC_NEXT, SUCC_NONE, SUCC_RET, SUCC_TABLESWITCH, T_BOOLEAN, T_BYTE, T_CHAR, T_DOUBLE, T_FLOAT, T_INT, T_LONG, T_REFERENCE, T_SHORT, T_VOID, TS, TYPE_BYTE, VBRANCH| Constructor and Description |
|---|
Output(OutputStream dest) |
Output(OutputStream destInit,
Pool constantsInit) |
| Modifier and Type | Method and Description |
|---|---|
int |
addIfNew(int id,
Object obj) |
void |
close() |
void |
closeCode() |
Code |
getCode() |
int |
getGlobalOfs() |
int |
getOfs() |
void |
openCode(Code code) |
void |
requireCode() |
static void |
save(ClassDef c,
File file) |
void |
write(byte[] data) |
void |
write(byte[] data,
int ofs,
int len) |
void |
writeClassMethodRef(MethodRef ref) |
void |
writeClassRef(ClassRef ref) |
void |
writeConstant(Object obj) |
void |
writeDouble(double value) |
void |
writeEndIdxOrLast(int startIdx,
int idx) |
void |
writeFieldRef(FieldRef ref) |
void |
writeFixup(int fixup,
int value) |
void |
writeFloat(float value) |
void |
writeIdx(int idx) |
void |
writeIdxOrLast(int idx) |
void |
writeInt(int value) |
void |
writeInterfaceMethodRef(MethodRef ref) |
void |
writeLong(long value) |
void |
writePad() |
void |
writeS1(int u1) |
void |
writeS2(int u2)
int c simplifies checking, casting
|
void |
writeShortFloat(float value) |
void |
writeShortInt(int value) |
void |
writeShortString(String value) |
int |
writeSpace(int size) |
void |
writeString(String value) |
void |
writeU1(int u1) |
void |
writeU2(int u2)
int c simplifies checking, casting
|
void |
writeU4(int u4)
int c simplifies checking, casting
|
void |
writeUtf8(String value) |
public Output(OutputStream dest)
public Output(OutputStream destInit, Pool constantsInit)
public static void save(ClassDef c, File file) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface AutoCloseableIOExceptionpublic void openCode(Code code)
public void closeCode()
public void requireCode()
public Code getCode()
public int getOfs()
public void writeEndIdxOrLast(int startIdx,
int idx)
throws IOException
IOExceptionpublic void writeIdxOrLast(int idx)
throws IOException
IOExceptionpublic void writeIdx(int idx)
throws IOException
IOExceptionpublic void write(byte[] data)
throws IOException
IOExceptionpublic void write(byte[] data,
int ofs,
int len)
throws IOException
IOExceptionpublic void writeU1(int u1)
throws IOException
IOExceptionpublic void writeS1(int u1)
throws IOException
IOExceptionpublic void writeU2(int u2)
throws IOException
IOExceptionpublic void writeS2(int u2)
throws IOException
IOExceptionpublic void writeU4(int u4)
throws IOException
IOExceptionpublic void writeConstant(Object obj) throws IOException
IOExceptionpublic void writeClassRef(ClassRef ref) throws IOException
IOExceptionpublic void writeFieldRef(FieldRef ref) throws IOException
IOExceptionpublic void writeClassMethodRef(MethodRef ref) throws IOException
IOExceptionpublic void writeInterfaceMethodRef(MethodRef ref) throws IOException
IOExceptionpublic void writeString(String value) throws IOException
IOExceptionpublic void writeInt(int value)
throws IOException
IOExceptionpublic void writeFloat(float value)
throws IOException
IOExceptionpublic void writeLong(long value)
throws IOException
IOExceptionpublic void writeDouble(double value)
throws IOException
IOExceptionpublic void writeShortString(String value) throws IOException
IOExceptionpublic void writeShortInt(int value)
throws IOException
IOExceptionpublic void writeShortFloat(float value)
throws IOException
IOExceptionpublic void writeUtf8(String value) throws IOException
IOExceptionpublic void writePad()
throws IOException
IOExceptionpublic int addIfNew(int id,
Object obj)
public int getGlobalOfs()
public int writeSpace(int size)
throws IOException
IOExceptionpublic void writeFixup(int fixup,
int value)
Copyright © 1998–2017 1&1. All rights reserved.