01: /* ====================================================================
02: Licensed to the Apache Software Foundation (ASF) under one or more
03: contributor license agreements. See the NOTICE file distributed with
04: this work for additional information regarding copyright ownership.
05: The ASF licenses this file to You under the Apache License, Version 2.0
06: (the "License"); you may not use this file except in compliance with
07: the License. You may obtain a copy of the License at
08:
09: http://www.apache.org/licenses/LICENSE-2.0
10:
11: Unless required by applicable law or agreed to in writing, software
12: distributed under the License is distributed on an "AS IS" BASIS,
13: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: See the License for the specific language governing permissions and
15: limitations under the License.
16: ==================================================================== */
17:
18: package org.apache.poi.hssf.record;
19:
20: public interface CustomField extends Cloneable {
21: /**
22: * @return The size of this field in bytes. This operation is not valid
23: * until after the call to <code>fillField()</code>
24: */
25: int getSize();
26:
27: /**
28: * Populates this fields data from the byte array passed in.
29: * @param in the RecordInputstream to read the record from
30: */
31: int fillField(RecordInputStream in);
32:
33: /**
34: * Appends the string representation of this field to the supplied
35: * StringBuffer.
36: *
37: * @param str The string buffer to append to.
38: */
39: void toString(StringBuffer str);
40:
41: /**
42: * Converts this field to it's byte array form.
43: * @param offset The offset into the byte array to start writing to.
44: * @param data The data array to write to.
45: * @return The number of bytes written.
46: */
47: int serializeField(int offset, byte[] data);
48:
49: }
|