poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1747090 [2/2] - in /poi/trunk/src/java/org/apache/poi: ./ ddf/
Date Mon, 06 Jun 2016 23:33:01 GMT
Modified: poi/trunk/src/java/org/apache/poi/ddf/EscherTextboxRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/EscherTextboxRecord.java?rev=1747090&r1=1747089&r2=1747090&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/EscherTextboxRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/EscherTextboxRecord.java Mon Jun  6 23:33:00 2016
@@ -40,6 +40,7 @@ public final class EscherTextboxRecord e
     {
     }
 
+    @Override
     public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory) {
         int bytesRemaining = readHeader( data, offset );
 
@@ -50,6 +51,7 @@ public final class EscherTextboxRecord e
         return bytesRemaining + 8;
     }
 
+    @Override
     public int serialize( int offset, byte[] data, EscherSerializationListener listener )
     {
         listener.beforeRecordSerialize( offset, getRecordId(), this );
@@ -73,6 +75,8 @@ public final class EscherTextboxRecord e
      * does not seem to put anything here, but with PowerPoint this will
      * contain the bytes that make up a TextHeaderAtom followed by a
      * TextBytesAtom/TextCharsAtom
+     * 
+     * @return the extra data
      */
     public byte[] getData()
     {
@@ -83,16 +87,29 @@ public final class EscherTextboxRecord e
      * Sets the extra data (in the parent application's format) to be
      * contained by the record. Used when the parent application changes
      * the contents.
+     * 
+     * @param b the buffer which contains the data
+     * @param start the start position in the buffer
+     * @param length the length of the block
      */
     public void setData(byte[] b, int start, int length)
     {
         thedata = new byte[length];
         System.arraycopy(b,start,thedata,0,length);
     }
+    
+    /**
+     * Sets the extra data (in the parent application's format) to be
+     * contained by the record. Used when the parent application changes
+     * the contents.
+     * 
+     * @param b the data
+     */
     public void setData(byte[] b) {
         setData(b,0,b.length);
     }
 
+    @Override
     public int getRecordSize()
     {
         return 8 + thedata.length;
@@ -107,10 +124,12 @@ public final class EscherTextboxRecord e
         return etr;
     }
 
+    @Override
     public String getRecordName() {
         return "ClientTextbox";
     }
 
+    @Override
     public String toString()
     {
         String nl = System.getProperty( "line.separator" );

Modified: poi/trunk/src/java/org/apache/poi/ddf/NullEscherSerializationListener.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/NullEscherSerializationListener.java?rev=1747090&r1=1747089&r2=1747090&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/NullEscherSerializationListener.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/NullEscherSerializationListener.java Mon Jun  6
23:33:00 2016
@@ -19,14 +19,14 @@ package org.apache.poi.ddf;
 
 /**
  * Ignores all serialization events.
- *
- * @author Glen Stampoultzis (glens at apache.org)
  */
 public class NullEscherSerializationListener implements EscherSerializationListener {
+    @Override
     public void beforeRecordSerialize(int offset, short recordId, EscherRecord record) {
         // do nothing
     }
 
+    @Override
     public void afterRecordSerialize(int offset, short recordId, int size, EscherRecord record)
{
         // do nothing
     }

Modified: poi/trunk/src/java/org/apache/poi/ddf/UnknownEscherRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/UnknownEscherRecord.java?rev=1747090&r1=1747089&r2=1747090&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/UnknownEscherRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/UnknownEscherRecord.java Mon Jun  6 23:33:00 2016
@@ -27,9 +27,6 @@ import org.apache.poi.util.LittleEndian;
 /**
  * This record is used whenever a escher record is encountered that
  * we do not explicitly support.
- *
- * @author Glen Stampoultzis (glens at apache.org)
- * @author Zhang Zhang (zhangzzh at gmail.com)
  */
 public final class UnknownEscherRecord extends EscherRecord implements Cloneable {
     private static final byte[] NO_BYTES = new byte[0];
@@ -42,13 +39,12 @@ public final class UnknownEscherRecord e
         _childRecords = new ArrayList<EscherRecord>();
     }
 
+    @Override
     public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory) {
         int bytesRemaining = readHeader( data, offset );
 		/*
-		 * Modified by Zhang Zhang
 		 * Have a check between avaliable bytes and bytesRemaining, 
 		 * take the avaliable length if the bytesRemaining out of range.
-		 * July 09, 2010
 		 */
 		int avaliable = data.length - (offset + 8);
 		if (bytesRemaining > avaliable) {
@@ -77,6 +73,7 @@ public final class UnknownEscherRecord e
         return bytesRemaining + 8;
     }
 
+    @Override
     public int serialize(int offset, byte[] data, EscherSerializationListener listener) {
         listener.beforeRecordSerialize( offset, getRecordId(), this );
 
@@ -97,18 +94,24 @@ public final class UnknownEscherRecord e
         return pos - offset;
     }
 
+    /**
+     * @return the data which makes up this record
+     */
     public byte[] getData() {
         return thedata;
     }
 
+    @Override
     public int getRecordSize() {
         return 8 + thedata.length;
     }
 
+    @Override
     public List<EscherRecord> getChildRecords() {
         return _childRecords;
     }
 
+    @Override
     public void setChildRecords(List<EscherRecord> childRecords) {
         _childRecords = childRecords;
     }
@@ -122,10 +125,12 @@ public final class UnknownEscherRecord e
         return uer;
     }
 
+    @Override
     public String getRecordName() {
         return "Unknown 0x" + HexDump.toHex(getRecordId());
     }
 
+    @Override
     public String toString() {
         StringBuffer children = new StringBuffer();
         if (getChildRecords().size() > 0) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message