make the code compatible with JDK 1.4.2
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@550726 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0191b2e01b
commit
ada61241db
@ -173,7 +173,7 @@ public class HSSFDateUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Translate \- into just -, before matching
|
// Translate \- into just -, before matching
|
||||||
String fs = formatString.replace("\\-","-");
|
String fs = formatString.replaceAll("\\\\-","-");
|
||||||
|
|
||||||
// Otherwise, check it's only made up of:
|
// Otherwise, check it's only made up of:
|
||||||
// y m d - /
|
// y m d - /
|
||||||
|
@ -280,7 +280,7 @@ public class XLS2CSVmra implements HSSFListener {
|
|||||||
// Java wants M not m for month
|
// Java wants M not m for month
|
||||||
format = format.replace('m','M');
|
format = format.replace('m','M');
|
||||||
// Change \- into -, if it's there
|
// Change \- into -, if it's there
|
||||||
format = format.replace("\\-","-");
|
format = format.replaceAll("\\\\-","-");
|
||||||
|
|
||||||
// Format as a date
|
// Format as a date
|
||||||
Date d = HSSFDateUtil.getJavaDate(value);
|
Date d = HSSFDateUtil.getJavaDate(value);
|
||||||
|
@ -71,7 +71,7 @@ public class VSDDumper {
|
|||||||
System.out.println(ind + " Length is\t" + ptr.getLength() +
|
System.out.println(ind + " Length is\t" + ptr.getLength() +
|
||||||
" - " + Integer.toHexString(ptr.getLength()));
|
" - " + Integer.toHexString(ptr.getLength()));
|
||||||
System.out.println(ind + " Compressed is\t" + ptr.destinationCompressed());
|
System.out.println(ind + " Compressed is\t" + ptr.destinationCompressed());
|
||||||
System.out.println(ind + " Stream is\t" + stream.getClass().getCanonicalName());
|
System.out.println(ind + " Stream is\t" + stream.getClass().getName());
|
||||||
|
|
||||||
byte[] db = stream._getStore()._getContents();
|
byte[] db = stream._getStore()._getContents();
|
||||||
String ds = "";
|
String ds = "";
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
/* ====================================================================
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
==================================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
package org.apache.poi.hdgf.exceptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The superclass of all HDGF exceptions
|
||||||
|
*
|
||||||
|
* @author Yegor Kozlov
|
||||||
|
*/
|
||||||
|
public class HDGFException extends RuntimeException {
|
||||||
|
|
||||||
|
public HDGFException() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HDGFException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public HDGFException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
public HDGFException(Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -21,6 +21,7 @@ import java.io.IOException;
|
|||||||
import org.apache.poi.hdgf.chunks.ChunkFactory;
|
import org.apache.poi.hdgf.chunks.ChunkFactory;
|
||||||
import org.apache.poi.hdgf.pointers.Pointer;
|
import org.apache.poi.hdgf.pointers.Pointer;
|
||||||
import org.apache.poi.hdgf.pointers.PointerFactory;
|
import org.apache.poi.hdgf.pointers.PointerFactory;
|
||||||
|
import org.apache.poi.hdgf.exceptions.HDGFException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base of all Streams within a HDGF document.
|
* Base of all Streams within a HDGF document.
|
||||||
@ -63,7 +64,7 @@ public abstract class Stream {
|
|||||||
);
|
);
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
// Should never occur
|
// Should never occur
|
||||||
throw new IllegalStateException(e);
|
throw new HDGFException(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
store = new StreamStore(
|
store = new StreamStore(
|
||||||
|
Loading…
Reference in New Issue
Block a user