public AxisOptionsRecord(RecordInputStream in) {
   field_1_minimumCategory = in.readShort();
   field_2_maximumCategory = in.readShort();
   field_3_majorUnitValue = in.readShort();
   field_4_majorUnit = in.readShort();
   field_5_minorUnitValue = in.readShort();
   field_6_minorUnit = in.readShort();
   field_7_baseUnit = in.readShort();
   field_8_crossingPoint = in.readShort();
   field_9_options = in.readShort();
 }
Ejemplo n.º 2
0
  /**
   * construct a unicode string record and fill its fields, ID is ignored
   *
   * @param in the RecordInputstream to read the record from
   */
  public UnicodeString(RecordInputStream in) {
    field_1_charCount = in.readShort();
    field_2_optionflags = in.readByte();

    int runCount = 0;
    int extensionLength = 0;
    // Read the number of rich runs if rich text.
    if (isRichText()) {
      runCount = in.readShort();
    }
    // Read the size of extended data if present.
    if (isExtendedText()) {
      extensionLength = in.readInt();
    }

    boolean isCompressed = ((field_2_optionflags & 1) == 0);
    if (isCompressed) {
      field_3_string = in.readCompressedUnicode(getCharCount());
    } else {
      field_3_string = in.readUnicodeLEString(getCharCount());
    }

    if (isRichText() && (runCount > 0)) {
      field_4_format_runs = new ArrayList<FormatRun>(runCount);
      for (int i = 0; i < runCount; i++) {
        field_4_format_runs.add(new FormatRun(in));
      }
    }

    if (isExtendedText() && (extensionLength > 0)) {
      field_5_ext_rst = new ExtRst(new ContinuableRecordInput(in), extensionLength);
      if (field_5_ext_rst.getDataSize() + 4 != extensionLength) {
        System.err.println(
            "ExtRst was supposed to be "
                + extensionLength
                + " bytes long, but seems to actually be "
                + (field_5_ext_rst.getDataSize() + 4));
      }
    }
  }