first commit
This commit is contained in:
23
hrmsEjb/jxl/write/biff/StringRecord.java
Normal file
23
hrmsEjb/jxl/write/biff/StringRecord.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package jxl.write.biff;
|
||||
|
||||
import jxl.biff.IntegerHelper;
|
||||
import jxl.biff.StringHelper;
|
||||
import jxl.biff.Type;
|
||||
import jxl.biff.WritableRecordData;
|
||||
|
||||
class StringRecord extends WritableRecordData {
|
||||
private String value;
|
||||
|
||||
public StringRecord(String val) {
|
||||
super(Type.STRING);
|
||||
this.value = val;
|
||||
}
|
||||
|
||||
public byte[] getData() {
|
||||
byte[] data = new byte[this.value.length() * 2 + 3];
|
||||
IntegerHelper.getTwoBytes(this.value.length(), data, 0);
|
||||
data[2] = 1;
|
||||
StringHelper.getUnicodeBytes(this.value, data, 3);
|
||||
return data;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user