Java - DataOutputStream的writeLong方法和编写hex

Ton*_*ark 1 java hex file-writing

目前,我有:

outByte.writeInt(0x49492a00); 
outByte.writeInt(0x08000000);
Run Code Online (Sandbox Code Playgroud)

但我希望能够在同一条线上写下所有这些内容.但:

outByte.writeLong(0x49492a0008000000)
Run Code Online (Sandbox Code Playgroud)

在Eclipse中加下划线红色,因此不正确.是否可以使用writeLong()将这两行写在一起?

Joa*_*uer 5

long在源代码中使用文字,您需要像这样追加l或添加L常量:

outByte.writeLong(0x49492a0008000000L)
Run Code Online (Sandbox Code Playgroud)