aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/hpsf
diff options
context:
space:
mode:
authorSergey Vladimirov <sergey@apache.org>2011-10-22 02:07:18 +0000
committerSergey Vladimirov <sergey@apache.org>2011-10-22 02:07:18 +0000
commit163f6a4d524fe7a04db598ebb7dc8d1c94e8c796 (patch)
treedf35bc5aa5d74f6f14f8b9fb698a1d26d055f1a1 /src/java/org/apache/poi/hpsf
parentb1cb49cf1078136b0b995aeb60d9e62b8dedc514 (diff)
downloadpoi-163f6a4d524fe7a04db598ebb7dc8d1c94e8c796.tar.gz
poi-163f6a4d524fe7a04db598ebb7dc8d1c94e8c796.zip
add license header; organize imports
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1187641 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/hpsf')
-rw-r--r--src/java/org/apache/poi/hpsf/Array.java16
-rw-r--r--src/java/org/apache/poi/hpsf/Blob.java16
-rw-r--r--src/java/org/apache/poi/hpsf/ClipboardData.java16
-rw-r--r--src/java/org/apache/poi/hpsf/CodePageString.java16
-rw-r--r--src/java/org/apache/poi/hpsf/Currency.java19
-rw-r--r--src/java/org/apache/poi/hpsf/Date.java19
-rw-r--r--src/java/org/apache/poi/hpsf/Decimal.java17
-rw-r--r--src/java/org/apache/poi/hpsf/Filetime.java16
-rw-r--r--src/java/org/apache/poi/hpsf/GUID.java17
-rw-r--r--src/java/org/apache/poi/hpsf/IndirectPropertyName.java16
-rw-r--r--src/java/org/apache/poi/hpsf/UnicodeString.java34
-rw-r--r--src/java/org/apache/poi/hpsf/VariantBool.java21
-rw-r--r--src/java/org/apache/poi/hpsf/Vector.java22
13 files changed, 225 insertions, 20 deletions
diff --git a/src/java/org/apache/poi/hpsf/Array.java b/src/java/org/apache/poi/hpsf/Array.java
index cdb78f6f92..8850ab9cd6 100644
--- a/src/java/org/apache/poi/hpsf/Array.java
+++ b/src/java/org/apache/poi/hpsf/Array.java
@@ -1,3 +1,19 @@
+/* ====================================================================
+ 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.hpsf;
import org.apache.poi.util.Internal;
diff --git a/src/java/org/apache/poi/hpsf/Blob.java b/src/java/org/apache/poi/hpsf/Blob.java
index 5ece25f327..547e2392ba 100644
--- a/src/java/org/apache/poi/hpsf/Blob.java
+++ b/src/java/org/apache/poi/hpsf/Blob.java
@@ -1,3 +1,19 @@
+/* ====================================================================
+ 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.hpsf;
import org.apache.poi.util.Internal;
diff --git a/src/java/org/apache/poi/hpsf/ClipboardData.java b/src/java/org/apache/poi/hpsf/ClipboardData.java
index 72e680489f..cf04733efa 100644
--- a/src/java/org/apache/poi/hpsf/ClipboardData.java
+++ b/src/java/org/apache/poi/hpsf/ClipboardData.java
@@ -1,3 +1,19 @@
+/* ====================================================================
+ 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.hpsf;
import java.io.IOException;
diff --git a/src/java/org/apache/poi/hpsf/CodePageString.java b/src/java/org/apache/poi/hpsf/CodePageString.java
index 89f3684832..3fe4fec9a0 100644
--- a/src/java/org/apache/poi/hpsf/CodePageString.java
+++ b/src/java/org/apache/poi/hpsf/CodePageString.java
@@ -1,3 +1,19 @@
+/* ====================================================================
+ 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.hpsf;
import java.io.IOException;
diff --git a/src/java/org/apache/poi/hpsf/Currency.java b/src/java/org/apache/poi/hpsf/Currency.java
index 204cb91db8..8928a56a03 100644
--- a/src/java/org/apache/poi/hpsf/Currency.java
+++ b/src/java/org/apache/poi/hpsf/Currency.java
@@ -1,8 +1,23 @@
-package org.apache.poi.hpsf;
+/* ====================================================================
+ 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
-import org.apache.poi.util.LittleEndian;
+ 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.hpsf;
import org.apache.poi.util.Internal;
+import org.apache.poi.util.LittleEndian;
@Internal
class Currency
diff --git a/src/java/org/apache/poi/hpsf/Date.java b/src/java/org/apache/poi/hpsf/Date.java
index ede62ee575..237420fcc0 100644
--- a/src/java/org/apache/poi/hpsf/Date.java
+++ b/src/java/org/apache/poi/hpsf/Date.java
@@ -1,8 +1,23 @@
-package org.apache.poi.hpsf;
+/* ====================================================================
+ 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
-import org.apache.poi.util.LittleEndian;
+ 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.hpsf;
import org.apache.poi.util.Internal;
+import org.apache.poi.util.LittleEndian;
@Internal
class Date
diff --git a/src/java/org/apache/poi/hpsf/Decimal.java b/src/java/org/apache/poi/hpsf/Decimal.java
index 7572945f80..8897d3d5b2 100644
--- a/src/java/org/apache/poi/hpsf/Decimal.java
+++ b/src/java/org/apache/poi/hpsf/Decimal.java
@@ -1,7 +1,22 @@
+/* ====================================================================
+ 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.hpsf;
import org.apache.poi.util.Internal;
-
import org.apache.poi.util.LittleEndian;
@Internal
diff --git a/src/java/org/apache/poi/hpsf/Filetime.java b/src/java/org/apache/poi/hpsf/Filetime.java
index bb7c3ff179..84a58bb1db 100644
--- a/src/java/org/apache/poi/hpsf/Filetime.java
+++ b/src/java/org/apache/poi/hpsf/Filetime.java
@@ -1,3 +1,19 @@
+/* ====================================================================
+ 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.hpsf;
import java.io.IOException;
diff --git a/src/java/org/apache/poi/hpsf/GUID.java b/src/java/org/apache/poi/hpsf/GUID.java
index 050cb9327d..4bbd7f3414 100644
--- a/src/java/org/apache/poi/hpsf/GUID.java
+++ b/src/java/org/apache/poi/hpsf/GUID.java
@@ -1,7 +1,22 @@
+/* ====================================================================
+ 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.hpsf;
import org.apache.poi.util.Internal;
-
import org.apache.poi.util.LittleEndian;
@Internal
diff --git a/src/java/org/apache/poi/hpsf/IndirectPropertyName.java b/src/java/org/apache/poi/hpsf/IndirectPropertyName.java
index 826136ccdd..d0dea877f5 100644
--- a/src/java/org/apache/poi/hpsf/IndirectPropertyName.java
+++ b/src/java/org/apache/poi/hpsf/IndirectPropertyName.java
@@ -1,3 +1,19 @@
+/* ====================================================================
+ 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.hpsf;
import org.apache.poi.util.Internal;
diff --git a/src/java/org/apache/poi/hpsf/UnicodeString.java b/src/java/org/apache/poi/hpsf/UnicodeString.java
index 5d10740068..dbb82528a2 100644
--- a/src/java/org/apache/poi/hpsf/UnicodeString.java
+++ b/src/java/org/apache/poi/hpsf/UnicodeString.java
@@ -1,3 +1,19 @@
+/* ====================================================================
+ 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.hpsf;
import org.apache.poi.util.Internal;
@@ -28,15 +44,6 @@ class UnicodeString
+ " is not NULL-terminated" );
}
- String toJavaString()
- {
- if ( _value.length == 0 )
- return null;
-
- return StringUtil.getFromUnicodeLE( _value, 0,
- ( _value.length - 2 ) >> 1 );
- }
-
int getSize()
{
return LittleEndian.INT_SIZE + _value.length;
@@ -46,4 +53,13 @@ class UnicodeString
{
return _value;
}
+
+ String toJavaString()
+ {
+ if ( _value.length == 0 )
+ return null;
+
+ return StringUtil.getFromUnicodeLE( _value, 0,
+ ( _value.length - 2 ) >> 1 );
+ }
}
diff --git a/src/java/org/apache/poi/hpsf/VariantBool.java b/src/java/org/apache/poi/hpsf/VariantBool.java
index 6b1dabc96c..667b1047d9 100644
--- a/src/java/org/apache/poi/hpsf/VariantBool.java
+++ b/src/java/org/apache/poi/hpsf/VariantBool.java
@@ -1,3 +1,19 @@
+/* ====================================================================
+ 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.hpsf;
import org.apache.poi.util.Internal;
@@ -8,8 +24,9 @@ import org.apache.poi.util.POILogger;
@Internal
class VariantBool
{
- private final static POILogger logger = POILogFactory.getLogger( VariantBool.class );
-
+ private final static POILogger logger = POILogFactory
+ .getLogger( VariantBool.class );
+
static final int SIZE = 2;
private boolean _value;
diff --git a/src/java/org/apache/poi/hpsf/Vector.java b/src/java/org/apache/poi/hpsf/Vector.java
index 65caad3b98..9cfa14310b 100644
--- a/src/java/org/apache/poi/hpsf/Vector.java
+++ b/src/java/org/apache/poi/hpsf/Vector.java
@@ -1,3 +1,19 @@
+/* ====================================================================
+ 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.hpsf;
import org.apache.poi.util.Internal;
@@ -15,15 +31,15 @@ class Vector
private TypedPropertyValue[] _values;
- Vector( short type )
+ Vector( byte[] data, int startOffset, short type )
{
this._type = type;
+ read( data, startOffset );
}
- Vector( byte[] data, int startOffset, short type )
+ Vector( short type )
{
this._type = type;
- read( data, startOffset );
}
int read( byte[] data, int startOffset )