1    package org.apache.poi.hssf.record;
2    
3    public interface CustomField
4            extends Cloneable
5    {
6        /**
7         * @return  The size of this field in bytes.  This operation is not valid
8         *          until after the call to <code>fillField()</code>
9         */
10       int getSize();
11   
12       /**
13        * Populates this fields data from the byte array passed in.
14        * @param   data raw data
15        * @param   size size of data
16        * @param   offset of the record's data (provided a big array of the file)
17        * @return  the number of bytes read.
18        */
19       int fillField(byte [] data, short size, int offset);
20   
21       /**
22        * Appends the string representation of this field to the supplied
23        * StringBuffer.
24        *
25        * @param str   The string buffer to append to.
26        */
27       void toString(StringBuffer str);
28   
29       /**
30        * Converts this field to it's byte array form.
31        * @param offset    The offset into the byte array to start writing to.
32        * @param data      The data array to write to.
33        * @return  The number of bytes written.
34        */
35       int serializeField(int offset, byte[] data);
36   
37   
38   }
39