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.hpsf.basic;
19:
20: import org.apache.poi.poifs.filesystem.POIFSDocumentPath;
21:
22: /**
23: * <p>A POI file just for testing.</p>
24: *
25: * @author Rainer Klute (klute@rainer-klute.de)
26: * @since 2002-07-20
27: * @version $Id: POIFile.java 489730 2006-12-22 19:18:16Z bayard $
28: */
29: public class POIFile {
30:
31: private String name;
32: private POIFSDocumentPath path;
33: private byte[] bytes;
34:
35: /**
36: * <p>Sets the POI file's name.</p>
37: *
38: * @param name The POI file's name.
39: */
40: public void setName(final String name) {
41: this .name = name;
42: }
43:
44: /**
45: * <p>Returns the POI file's name.</p>
46: *
47: * @return The POI file's name.
48: */
49: public String getName() {
50: return name;
51: }
52:
53: /**
54: * <p>Sets the POI file's path.</p>
55: *
56: * @param path The POI file's path.
57: */
58: public void setPath(final POIFSDocumentPath path) {
59: this .path = path;
60: }
61:
62: /**
63: * <p>Returns the POI file's path.</p>
64: *
65: * @return The POI file's path.
66: */
67: public POIFSDocumentPath getPath() {
68: return path;
69: }
70:
71: /**
72: * <p>Sets the POI file's content bytes.</p>
73: *
74: * @param bytes The POI file's content bytes.
75: */
76: public void setBytes(final byte[] bytes) {
77: this .bytes = bytes;
78: }
79:
80: /**
81: * <p>Returns the POI file's content bytes.</p>
82: *
83: * @return The POI file's content bytes.
84: */
85: public byte[] getBytes() {
86: return bytes;
87: }
88:
89: }
|