aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/ddf/EscherComplexProperty.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/poi/ddf/EscherComplexProperty.java')
-rw-r--r--src/java/org/apache/poi/ddf/EscherComplexProperty.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/ddf/EscherComplexProperty.java b/src/java/org/apache/poi/ddf/EscherComplexProperty.java
index 9a84e10c1c..04712be4df 100644
--- a/src/java/org/apache/poi/ddf/EscherComplexProperty.java
+++ b/src/java/org/apache/poi/ddf/EscherComplexProperty.java
@@ -29,7 +29,7 @@ import org.apache.poi.util.LittleEndian;
*/
public class EscherComplexProperty extends EscherProperty {
// TODO - make private and final
- protected byte[] _complexData;
+ private byte[] _complexData;
/**
* Create a complex property using the property id and a byte array containing the complex
@@ -95,6 +95,16 @@ public class EscherComplexProperty extends EscherProperty {
return _complexData;
}
+ protected void resizeComplexData(int newSize, int bytesToKeep) {
+ if (newSize == _complexData.length) {
+ return;
+ }
+ byte[] newArray = new byte[newSize];
+ System.arraycopy(_complexData, 0, newArray, 0, Math.min(bytesToKeep, newSize));
+ _complexData = newArray;
+ }
+
+
/**
* Determine whether this property is equal to another property.
*