Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 ASM 来转换一个 java 类。我不想将字节数组加载到内存中,而是将生成的字节数组保存到 .class 文件中。ASM 手册说这是可能的,但没有给出示例。我怎样才能做到这一点?
只需打开一个FileOutputStream,write将字节数组放入close其中即可。
FileOutputStream
write
close