KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > poi > poifs > filesystem > POIFSWriterEvent


1
2 /* ====================================================================
3    Copyright 2002-2004 Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        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
19 package org.apache.poi.poifs.filesystem;
20
21 /**
22  * Class POIFSWriterEvent
23  *
24  * @author Marc Johnson (mjohnson at apache dot org)
25  * @version %I%, %G%
26  */

27
28 public class POIFSWriterEvent
29 {
30     private DocumentOutputStream stream;
31     private POIFSDocumentPath path;
32     private String JavaDoc documentName;
33     private int limit;
34
35     /**
36      * package scoped constructor
37      *
38      * @param stream the DocumentOutputStream, freshly opened
39      * @param path the path of the document
40      * @param documentName the name of the document
41      * @param limit the limit, in bytes, that can be written to the
42      * stream
43      */

44
45     POIFSWriterEvent(final DocumentOutputStream stream,
46                      final POIFSDocumentPath path, final String JavaDoc documentName,
47                      final int limit)
48     {
49         this.stream = stream;
50         this.path = path;
51         this.documentName = documentName;
52         this.limit = limit;
53     }
54
55     /**
56      * @return the DocumentOutputStream, freshly opened
57      */

58
59     public DocumentOutputStream getStream()
60     {
61         return stream;
62     }
63
64     /**
65      * @return the document's path
66      */

67
68     public POIFSDocumentPath getPath()
69     {
70         return path;
71     }
72
73     /**
74      * @return the document's name
75      */

76
77     public String JavaDoc getName()
78     {
79         return documentName;
80     }
81
82     /**
83      * @return the limit on writing, in bytes
84      */

85
86     public int getLimit()
87     {
88         return limit;
89     }
90 } // end public class POIFSWriterEvent
91

92
Popular Tags