KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > poi > hwpf > model > SEPX


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
20 package org.apache.poi.hwpf.model;
21
22 import org.apache.poi.hwpf.sprm.SprmBuffer;
23 import org.apache.poi.hwpf.sprm.SectionSprmUncompressor;
24 import org.apache.poi.hwpf.sprm.SectionSprmCompressor;
25 import org.apache.poi.hwpf.usermodel.SectionProperties;
26
27 public class SEPX extends PropertyNode
28 {
29
30   SectionDescriptor _sed;
31
32   public SEPX(SectionDescriptor sed, int start, int end, byte[] grpprl)
33   {
34     super(start, end, SectionSprmUncompressor.uncompressSEP(grpprl, 0));
35     _sed = sed;
36   }
37
38   public byte[] getGrpprl()
39   {
40     return SectionSprmCompressor.compressSectionProperty((SectionProperties)_buf);
41   }
42
43   public SectionDescriptor getSectionDescriptor()
44   {
45     return _sed;
46   }
47
48   public SectionProperties getSectionProperties()
49   {
50     return (SectionProperties)_buf;
51   }
52
53   public boolean equals(Object JavaDoc o)
54   {
55     SEPX sepx = (SEPX)o;
56     if (super.equals(o))
57     {
58       return sepx._sed.equals(_sed);
59     }
60     return false;
61   }
62 }
63
Popular Tags