Exemplo n.º 1
0
  /** @param in the RecordInputstream to read the record from */
  public LabelRecord(RecordInputStream in) {
    field_1_row = in.readUShort();
    field_2_column = in.readShort();
    field_3_xf_index = in.readShort();
    field_4_string_len = in.readShort();
    field_5_unicode_flag = in.readByte();
    if (field_4_string_len > 0) {
      if (isUnCompressedUnicode()) {
        field_6_value = in.readUnicodeLEString(field_4_string_len);
      } else {
        field_6_value = in.readCompressedUnicode(field_4_string_len);
      }
    } else {
      field_6_value = "";
    }

    if (in.remaining() > 0) {
      logger.log(
          POILogger.INFO,
          "LabelRecord data remains: "
              + in.remaining()
              + " : "
              + HexDump.toHex(in.readRemainder()));
    }
  }
 private static String readRawString(RecordInputStream in, int textLength) {
   byte compressByte = in.readByte();
   boolean isCompressed = (compressByte & 0x01) == 0;
   if (isCompressed) {
     return in.readCompressedUnicode(textLength);
   }
   return in.readUnicodeLEString(textLength);
 }
Exemplo n.º 3
0
  /** @param in the RecordInputstream to read the record from */
  public StringRecord(RecordInputStream in) {
    int field_1_string_length = in.readUShort();
    _is16bitUnicode = in.readByte() != 0x00;

    if (_is16bitUnicode) {
      _text = in.readUnicodeLEString(field_1_string_length);
    } else {
      _text = in.readCompressedUnicode(field_1_string_length);
    }
  }