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: package org.apache.poi.hdgf.chunks;
18:
19: /**
20: * A chunk header from v11+
21: */
22: public class ChunkHeaderV11 extends ChunkHeaderV6 {
23: /**
24: * Does the chunk have a separator?
25: */
26: public boolean hasSeparator() {
27: // For some reason, there are two types that don't have a
28: // separator despite the flags that indicate they do
29: if (type == 0x1f || type == 0xc9) {
30: return false;
31: }
32:
33: // If there's a trailer, there's a separator
34: if (hasTrailer()) {
35: return true;
36: }
37:
38: if (unknown2 == 2 && unknown3 == 0x55) {
39: return true;
40: }
41: if (unknown2 == 2 && unknown3 == 0x54 && type == 0xaa) {
42: return true;
43: }
44: if (unknown2 == 3 && unknown3 != 0x50) {
45: return true;
46: }
47: if (type == 0x69) {
48: return true;
49: }
50:
51: return false;
52: }
53: }
|