我正在尝试将我定义的名为 lineId 的对象转换为字节数组,以便将其反馈给OutputStream.write
static void serialize(IACLineSegment objectToSerialze, OutputStream outputStream) {
ConductingEquipmentSerializer.serialize(objectToSerialze, outputStream);
byte[] bytes
ID lineId = objectToSerialze.getLine().getId();
if (lineId != null){
outputStream.write(//lineId byte array);
}