Source:
<code>public final void writeLabel(final LabelSegment labelSegment) throws IOException, NitfFormatException { writeFixedLengthString(LabelConstants.LA, LabelConstants.LA.length()); writeFixedLengthString(labelSegment.getIdentifier(), LabelConstants.LID_LENGTH); writeSecurityMetadata(labelSegment.getSecurityMetadata()); writeENCRYP(); writeFixedLengthString(" ", LabelConstants.LFS_LENGTH); writeFixedLengthNumber(labelSegment.getLabelCellWidth(), LabelConstants.LCW_LENGTH); writeFixedLengthNumber(labelSegment.getLabelCellHeight(), LabelConstants.LCH_LENGTH); writeFixedLengthNumber(labelSegment.getLabelDisplayLevel(), LabelConstants.LDLVL_LENGTH); writeFixedLengthNumber(labelSegment.getAttachmentLevel(), LabelConstants.LALVL_LENGTH); writeFixedLengthNumber(labelSegment.getLabelLocationRow(), LabelConstants.LLOC_HALF_LENGTH); writeFixedLengthNumber(labelSegment.getLabelLocationColumn(), LabelConstants.LLOC_HALF_LENGTH); writeBytes(labelSegment.getLabelTextColour().toByteArray(), RGBColourImpl.RGB_COLOUR_LENGTH); writeBytes(labelSegment.getLabelBackgroundColour().toByteArray(), RGBColourImpl.RGB_COLOUR_LENGTH); byte[] labelExtendedSubheaderData = mTreParser.getTREs(labelSegment, TreSource.LabelExtendedSubheaderData); int labelExtendedSubheaderDataLength = labelExtendedSubheaderData.length; if ((labelExtendedSubheaderDataLength > 0) || (labelSegment.getExtendedHeaderDataOverflow() != 0)) { labelExtendedSubheaderDataLength += LabelConstants.LXSOFL_LENGTH; } writeFixedLengthNumber(labelExtendedSubheaderDataLength, LabelConstants.LXSHDL_LENGTH); if (labelExtendedSubheaderDataLength > 0) { writeFixedLengthNumber(labelSegment.getExtendedHeaderDataOverflow(), LabelConstants.LXSOFL_LENGTH); writeBytes(labelExtendedSubheaderData, labelExtendedSubheaderDataLength - LabelConstants.LXSOFL_LENGTH); } mOutput.writeBytes(labelSegment.getData()); <START> } <END></code><technical_language>I static imports</technical_language>

Target:
public final void writeLabel(final LabelSegment labelSegment) throws IOException, NitfFormatException { writeFixedLengthString(LA, LA.length()); writeFixedLengthString(labelSegment.getIdentifier(), LID_LENGTH); writeSecurityMetadata(labelSegment.getSecurityMetadata()); writeENCRYP(); writeFixedLengthString(" ", LFS_LENGTH); writeFixedLengthNumber(labelSegment.getLabelCellWidth(), LCW_LENGTH); writeFixedLengthNumber(labelSegment.getLabelCellHeight(), LCH_LENGTH); writeFixedLengthNumber(labelSegment.getLabelDisplayLevel(), LDLVL_LENGTH); writeFixedLengthNumber(labelSegment.getAttachmentLevel(), LALVL_LENGTH); writeFixedLengthNumber(labelSegment.getLabelLocationRow(), LLOC_HALF_LENGTH); writeFixedLengthNumber(labelSegment.getLabelLocationColumn(), LLOC_HALF_LENGTH); writeBytes(labelSegment.getLabelTextColour().toByteArray(), RGBColourImpl.RGB_COLOUR_LENGTH); writeBytes(labelSegment.getLabelBackgroundColour().toByteArray(), RGBColourImpl.RGB_COLOUR_LENGTH); byte[] labelExtendedSubheaderData = mTreParser.getTREs(labelSegment, TreSource.LabelExtendedSubheaderData); int labelExtendedSubheaderDataLength = labelExtendedSubheaderData.length; if ((labelExtendedSubheaderDataLength > 0) || (labelSegment.getExtendedHeaderDataOverflow() != 0)) { labelExtendedSubheaderDataLength += LXSOFL_LENGTH; } writeFixedLengthNumber(labelExtendedSubheaderDataLength, LXSHDL_LENGTH); if (labelExtendedSubheaderDataLength > 0) { writeFixedLengthNumber(labelSegment.getExtendedHeaderDataOverflow(), LXSOFL_LENGTH); writeBytes(labelExtendedSubheaderData, labelExtendedSubheaderDataLength - LXSOFL_LENGTH); } mOutput.writeBytes(labelSegment.getData()); }