Summary: | [PATCH] PoiFSConstants should be POIFSConstants | ||
---|---|---|---|
Product: | POI | Reporter: | Andy Oliver <poi-support> |
Component: | POIFS | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 1.5 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | other |
Description
Andy Oliver
2002-03-10 17:29:46 UTC
cvs server: Diffing . cvs server: Diffing build cvs server: Diffing legal cvs server: Diffing lib cvs server: Diffing lib/core cvs server: Diffing lib/optional cvs server: Diffing src cvs server: Diffing src/contrib cvs server: Diffing src/contrib/lib cvs server: Diffing src/contrib/src cvs server: Diffing src/contrib/src/org cvs server: Diffing src/contrib/src/org/apache cvs server: Diffing src/contrib/src/org/apache/poi cvs server: Diffing src/contrib/src/org/apache/poi/contrib cvs server: Diffing src/contrib/src/org/apache/poi/contrib/poibrowser cvs server: Diffing src/contrib/targets cvs server: Diffing src/documentation cvs server: Diffing src/documentation/images cvs server: Diffing src/documentation/stylesheets cvs server: Diffing src/documentation/stylesheets/printer_skin cvs server: Diffing src/documentation/xdocs cvs server: Diffing src/documentation/xdocs/dtd cvs server: Diffing src/documentation/xdocs/hdf cvs server: Diffing src/documentation/xdocs/hpsf cvs server: Diffing src/documentation/xdocs/hssf cvs server: Diffing src/documentation/xdocs/plan cvs server: Diffing src/documentation/xdocs/poifs cvs server: Diffing src/documentation/xdocs/poifs/html cvs server: Diffing src/documentation/xdocs/resolutions cvs server: Diffing src/documentation/xdocs/utils cvs server: Diffing src/examples cvs server: Diffing src/examples/src cvs server: Diffing src/examples/src/org cvs server: Diffing src/examples/src/org/apache cvs server: Diffing src/examples/src/org/apache/poi cvs server: Diffing src/examples/src/org/apache/poi/hssf cvs server: Diffing src/examples/src/org/apache/poi/hssf/usermodel cvs server: Diffing src/examples/src/org/apache/poi/hssf/usermodel/examples cvs server: Diffing src/java cvs server: Diffing src/java/org cvs server: Diffing src/java/org/apache cvs server: Diffing src/java/org/apache/poi cvs server: Diffing src/java/org/apache/poi/hdf cvs server: Diffing src/java/org/apache/poi/hpsf cvs server: Diffing src/java/org/apache/poi/hpsf/littleendian cvs server: Diffing src/java/org/apache/poi/hpsf/wellknown cvs server: Diffing src/java/org/apache/poi/hssf cvs server: Diffing src/java/org/apache/poi/hssf/dev cvs server: Diffing src/java/org/apache/poi/hssf/eventmodel cvs server: Diffing src/java/org/apache/poi/hssf/model cvs server: Diffing src/java/org/apache/poi/hssf/record cvs server: Diffing src/java/org/apache/poi/hssf/record/aggregates cvs server: Diffing src/java/org/apache/poi/hssf/record/formula cvs server: Diffing src/java/org/apache/poi/hssf/usermodel cvs server: Diffing src/java/org/apache/poi/hssf/util cvs server: Diffing src/java/org/apache/poi/poifs cvs server: Diffing src/java/org/apache/poi/poifs/common Index: src/java/org/apache/poi/poifs/common/PoiFSConstants.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/common/PoiFSConstants.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 PoiFSConstants.java --- src/java/org/apache/poi/poifs/common/PoiFSConstants.java 31 Jan 2002 02:23:44 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/common/PoiFSConstants.java 14 Mar 2002 14:49:06 -0000 @@ -61,11 +61,11 @@ * @author Marc Johnson (mjohnson at apache dot org) */ -public interface PoiFSConstants +public interface POIFSConstants { public static final int BIG_BLOCK_SIZE = 0x0200; public static final int END_OF_CHAIN = -2; public static final int PROPERTY_SIZE = 0x0080; public static final int UNUSED_BLOCK = -1; -} // end public interface PoiFSConstants; +} // end public interface POIFSConstants; cvs server: Diffing src/java/org/apache/poi/poifs/dev cvs server: Diffing src/java/org/apache/poi/poifs/eventfilesystem cvs server: Diffing src/java/org/apache/poi/poifs/filesystem Index: src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 POIFSDocument.java --- src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java 14 Mar 2002 14:49:09 -0000 @@ -59,7 +59,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.dev.POIFSViewable; import org.apache.poi.poifs.property.DocumentProperty; import org.apache.poi.poifs.property.Property; @@ -628,7 +628,7 @@ writer.processPOIFSWriterEvent( new POIFSWriterEvent(dstream, path, name, size)); dstream.writeFiller(countBlocks() - * PoiFSConstants + * POIFSConstants .BIG_BLOCK_SIZE, DocumentBlock .getFillByte()); } @@ -654,8 +654,8 @@ { if (writer != null) { - rval = (size + PoiFSConstants.BIG_BLOCK_SIZE - 1) - / PoiFSConstants.BIG_BLOCK_SIZE; + rval = (size + POIFSConstants.BIG_BLOCK_SIZE - 1) + / POIFSConstants.BIG_BLOCK_SIZE; } else { Index: src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 POIFSFileSystem.java --- src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java 14 Mar 2002 14:49:11 -0000 @@ -59,7 +59,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.dev.POIFSViewable; import org.apache.poi.poifs.property.DirectoryProperty; import org.apache.poi.poifs.property.DocumentProperty; cvs server: Diffing src/java/org/apache/poi/poifs/property Index: src/java/org/apache/poi/poifs/property/Property.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/property/Property.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 Property.java --- src/java/org/apache/poi/poifs/property/Property.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/property/Property.java 14 Mar 2002 14:49:13 -0000 @@ -59,7 +59,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.dev.POIFSViewable; import org.apache.poi.util.ByteField; import org.apache.poi.util.IntegerField; @@ -124,7 +124,7 @@ protected Property() { - _raw_data = new byte[ PoiFSConstants.PROPERTY_SIZE ]; + _raw_data = new byte[ POIFSConstants.PROPERTY_SIZE ]; Arrays.fill(_raw_data, _default_fill); _name_size = new ShortField(_name_size_offset); _property_type = @@ -160,9 +160,9 @@ protected Property(final int index, final byte [] array, final int offset) { - _raw_data = new byte[ PoiFSConstants.PROPERTY_SIZE ]; + _raw_data = new byte[ POIFSConstants.PROPERTY_SIZE ]; System.arraycopy(array, offset, _raw_data, 0, - PoiFSConstants.PROPERTY_SIZE); + POIFSConstants.PROPERTY_SIZE); _name_size = new ShortField(_name_size_offset, _raw_data); _property_type = new ByteField(PropertyConstants.PROPERTY_TYPE_OFFSET, _raw_data); Index: src/java/org/apache/poi/poifs/property/PropertyFactory.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/property/PropertyFactory.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 PropertyFactory.java --- src/java/org/apache/poi/poifs/property/PropertyFactory.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/property/PropertyFactory.java 14 Mar 2002 14:49:14 -0000 @@ -59,7 +59,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.storage.ListManagedBlock; /** @@ -102,7 +102,7 @@ { byte[] data = blocks[ j ].getData(); int property_count = data.length - / PoiFSConstants.PROPERTY_SIZE; + / POIFSConstants.PROPERTY_SIZE; int offset = 0; for (int k = 0; k < property_count; k++) @@ -130,7 +130,7 @@ properties.add(null); break; } - offset += PoiFSConstants.PROPERTY_SIZE; + offset += POIFSConstants.PROPERTY_SIZE; } } return properties; Index: src/java/org/apache/poi/poifs/property/PropertyTable.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/property/PropertyTable.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 PropertyTable.java --- src/java/org/apache/poi/poifs/property/PropertyTable.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/property/PropertyTable.java 14 Mar 2002 14:49:15 -0000 @@ -60,7 +60,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.filesystem.BATManaged; import org.apache.poi.poifs.storage.BlockWritable; import org.apache.poi.poifs.storage.PropertyBlock; @@ -88,7 +88,7 @@ public PropertyTable() { - _start_block = PoiFSConstants.END_OF_CHAIN; + _start_block = POIFSConstants.END_OF_CHAIN; _properties = new ArrayList(); addProperty(new RootProperty()); _blocks = null; @@ -110,7 +110,7 @@ final RawDataBlockList blockList) throws IOException { - _start_block = PoiFSConstants.END_OF_CHAIN; + _start_block = POIFSConstants.END_OF_CHAIN; _blocks = null; _properties = PropertyFactory Index: src/java/org/apache/poi/poifs/property/RootProperty.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/property/RootProperty.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 RootProperty.java --- src/java/org/apache/poi/poifs/property/RootProperty.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/property/RootProperty.java 14 Mar 2002 14:49:15 -0000 @@ -59,7 +59,7 @@ import java.io.IOException; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.storage.SmallDocumentBlock; /** @@ -83,7 +83,7 @@ // overrides setNodeColor(_NODE_BLACK); setPropertyType(PropertyConstants.ROOT_TYPE); - setStartBlock(PoiFSConstants.END_OF_CHAIN); + setStartBlock(POIFSConstants.END_OF_CHAIN); } /** cvs server: Diffing src/java/org/apache/poi/poifs/storage Index: src/java/org/apache/poi/poifs/storage/BATBlock.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/storage/BATBlock.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 BATBlock.java --- src/java/org/apache/poi/poifs/storage/BATBlock.java 31 Jan 2002 02:23:45 - 0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/storage/BATBlock.java 14 Mar 2002 14:49:16 - 0000 @@ -60,7 +60,7 @@ import java.util.Arrays; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.IntegerField; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -76,7 +76,7 @@ extends BigBlock { private static final int _entries_per_block = - PoiFSConstants.BIG_BLOCK_SIZE / LittleEndianConsts.INT_SIZE; + POIFSConstants.BIG_BLOCK_SIZE / LittleEndianConsts.INT_SIZE; private static final int _entries_per_xbat_block = _entries_per_block - 1; private static final int _xbat_chain_offset = @@ -91,7 +91,7 @@ private BATBlock() { - _data = new byte[ PoiFSConstants.BIG_BLOCK_SIZE ]; + _data = new byte[ POIFSConstants.BIG_BLOCK_SIZE ]; Arrays.fill(_data, _default_value); _fields = new IntegerField[ _entries_per_block ]; int offset = 0; @@ -164,7 +164,7 @@ { blocks[ index ].setXBATChain(startBlock + index + 1); } - blocks[ index ].setXBATChain(PoiFSConstants.END_OF_CHAIN); + blocks[ index ].setXBATChain(POIFSConstants.END_OF_CHAIN); } return blocks; } Index: src/java/org/apache/poi/poifs/storage/BlockAllocationTableReader.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/storage/BlockAllocationTableReader.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 BlockAllocationTableReader.java --- src/java/org/apache/poi/poifs/storage/BlockAllocationTableReader.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/storage/BlockAllocationTableReader.java 14 Mar 2002 14:49:17 -0000 @@ -60,7 +60,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.IntList; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -158,7 +158,7 @@ offset += LittleEndianConsts.INT_SIZE; } chain_index = LittleEndian.getInt(data, chain_index_offset); - if (chain_index == PoiFSConstants.END_OF_CHAIN) + if (chain_index == POIFSConstants.END_OF_CHAIN) { break; } @@ -222,7 +222,7 @@ List blocks = new ArrayList(); int currentBlock = startBlock; - while (currentBlock != PoiFSConstants.END_OF_CHAIN) + while (currentBlock != POIFSConstants.END_OF_CHAIN) { blocks.add(blockList.remove(currentBlock)); currentBlock = _entries.get(currentBlock); @@ -261,7 +261,7 @@ * @param index of the current block * * @return index of the next block (may be - * PoiFSConstants.END_OF_CHAIN, indicating end of chain + * POIFSConstants.END_OF_CHAIN, indicating end of chain * (duh)) * * @exception IOException if the current block is unused @@ -305,7 +305,7 @@ { int entry = LittleEndian.getInt(data, offset); - if (entry == PoiFSConstants.UNUSED_BLOCK) + if (entry == POIFSConstants.UNUSED_BLOCK) { raw_blocks.zap(_entries.size()); } Index: src/java/org/apache/poi/poifs/storage/BlockAllocationTableWriter.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/storage/BlockAllocationTableWriter.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 BlockAllocationTableWriter.java --- src/java/org/apache/poi/poifs/storage/BlockAllocationTableWriter.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/storage/BlockAllocationTableWriter.java 14 Mar 2002 14:49:18 -0000 @@ -60,7 +60,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.filesystem.BATManaged; import org.apache.poi.util.IntList; import org.apache.poi.util.LittleEndian; @@ -95,7 +95,7 @@ public BlockAllocationTableWriter() { - _start_block = PoiFSConstants.END_OF_CHAIN; + _start_block = POIFSConstants.END_OF_CHAIN; _entries = new IntList(); _blocks = new BATBlock[ 0 ]; } @@ -162,7 +162,7 @@ { _entries.add(index++); } - _entries.add(PoiFSConstants.END_OF_CHAIN); + _entries.add(POIFSConstants.END_OF_CHAIN); } return startBlock; } Index: src/java/org/apache/poi/poifs/storage/DocumentBlock.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/storage/DocumentBlock.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 DocumentBlock.java --- src/java/org/apache/poi/poifs/storage/DocumentBlock.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/storage/DocumentBlock.java 14 Mar 2002 14:49:19 -0000 @@ -61,7 +61,7 @@ import java.util.Arrays; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.IntegerField; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -118,7 +118,7 @@ private DocumentBlock() { - _data = new byte[ PoiFSConstants.BIG_BLOCK_SIZE ]; + _data = new byte[ POIFSConstants.BIG_BLOCK_SIZE ]; Arrays.fill(_data, _default_value); } @@ -141,7 +141,7 @@ public boolean partiallyRead() { - return _bytes_read != PoiFSConstants.BIG_BLOCK_SIZE; + return _bytes_read != POIFSConstants.BIG_BLOCK_SIZE; } /** @@ -168,7 +168,7 @@ final int size) { DocumentBlock[] rval = - new DocumentBlock[ (size + PoiFSConstants.BIG_BLOCK_SIZE - 1) / PoiFSConstants.BIG_BLOCK_SIZE ]; + new DocumentBlock[ (size + POIFSConstants.BIG_BLOCK_SIZE - 1) / POIFSConstants.BIG_BLOCK_SIZE ]; int offset = 0; for (int k = 0; k < rval.length; k++) @@ -176,14 +176,14 @@ rval[ k ] = new DocumentBlock(); if (offset < array.length) { - int length = Math.min(PoiFSConstants.BIG_BLOCK_SIZE, + int length = Math.min(POIFSConstants.BIG_BLOCK_SIZE, array.length - offset); System.arraycopy(array, offset, rval[ k ]._data, 0, length); - if (length != PoiFSConstants.BIG_BLOCK_SIZE) + if (length != POIFSConstants.BIG_BLOCK_SIZE) { Arrays.fill(rval[ k ]._data, length, - PoiFSConstants.BIG_BLOCK_SIZE, + POIFSConstants.BIG_BLOCK_SIZE, _default_value); } } @@ -191,7 +191,7 @@ { Arrays.fill(rval[ k ]._data, _default_value); } - offset += PoiFSConstants.BIG_BLOCK_SIZE; + offset += POIFSConstants.BIG_BLOCK_SIZE; } return rval; } @@ -207,10 +207,10 @@ public static void read(final DocumentBlock [] blocks, final byte [] buffer, final int offset) { - int firstBlockIndex = offset / PoiFSConstants.BIG_BLOCK_SIZE; - int firstBlockOffset = offset % PoiFSConstants.BIG_BLOCK_SIZE; + int firstBlockIndex = offset / POIFSConstants.BIG_BLOCK_SIZE; + int firstBlockOffset = offset % POIFSConstants.BIG_BLOCK_SIZE; int lastBlockIndex = (offset + buffer.length - 1) - / PoiFSConstants.BIG_BLOCK_SIZE; + / POIFSConstants.BIG_BLOCK_SIZE; if (firstBlockIndex == lastBlockIndex) { @@ -223,14 +223,14 @@ System.arraycopy(blocks[ firstBlockIndex ]._data, firstBlockOffset, buffer, buffer_offset, - PoiFSConstants.BIG_BLOCK_SIZE + POIFSConstants.BIG_BLOCK_SIZE - firstBlockOffset); - buffer_offset += PoiFSConstants.BIG_BLOCK_SIZE - firstBlockOffset; + buffer_offset += POIFSConstants.BIG_BLOCK_SIZE - firstBlockOffset; for (int j = firstBlockIndex + 1; j < lastBlockIndex; j++) { System.arraycopy(blocks[ j ]._data, 0, buffer, buffer_offset, - PoiFSConstants.BIG_BLOCK_SIZE); - buffer_offset += PoiFSConstants.BIG_BLOCK_SIZE; + POIFSConstants.BIG_BLOCK_SIZE); + buffer_offset += POIFSConstants.BIG_BLOCK_SIZE; } System.arraycopy(blocks[ lastBlockIndex ]._data, 0, buffer, buffer_offset, buffer.length - buffer_offset); Index: src/java/org/apache/poi/poifs/storage/HeaderBlockConstants.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/storage/HeaderBlockConstants.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 HeaderBlockConstants.java --- src/java/org/apache/poi/poifs/storage/HeaderBlockConstants.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/storage/HeaderBlockConstants.java 14 Mar 2002 14:49:19 -0000 @@ -55,7 +55,7 @@ package org.apache.poi.poifs.storage; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.IntegerField; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -73,7 +73,7 @@ public static final long _signature = 0xE11AB1A1E011CFD0L; public static final int _bat_array_offset = 0x4c; public static final int _max_bats_in_header = - (PoiFSConstants.BIG_BLOCK_SIZE - _bat_array_offset) + (POIFSConstants.BIG_BLOCK_SIZE - _bat_array_offset) / LittleEndianConsts.INT_SIZE; // useful offsets Index: src/java/org/apache/poi/poifs/storage/HeaderBlockReader.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/storage/HeaderBlockReader.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 HeaderBlockReader.java --- src/java/org/apache/poi/poifs/storage/HeaderBlockReader.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/storage/HeaderBlockReader.java 14 Mar 2002 14:49:20 -0000 @@ -59,7 +59,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.IntegerField; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -103,17 +103,17 @@ public HeaderBlockReader(final InputStream stream) throws IOException { - _data = new byte[ PoiFSConstants.BIG_BLOCK_SIZE ]; + _data = new byte[ POIFSConstants.BIG_BLOCK_SIZE ]; int byte_count = stream.read(_data); - if (byte_count != PoiFSConstants.BIG_BLOCK_SIZE) + if (byte_count != POIFSConstants.BIG_BLOCK_SIZE) { String type = " byte" + ((byte_count == 1) ? ("") : ("s")); throw new IOException("Unable to read entire header; " + byte_count + type + " read; expected " - + PoiFSConstants.BIG_BLOCK_SIZE + " bytes"); + + POIFSConstants.BIG_BLOCK_SIZE + " bytes"); } // verify signature Index: src/java/org/apache/poi/poifs/storage/HeaderBlockWriter.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/storage/HeaderBlockWriter.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 HeaderBlockWriter.java --- src/java/org/apache/poi/poifs/storage/HeaderBlockWriter.java 31 Jan 2002 02:23:45 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/storage/HeaderBlockWriter.java 14 Mar 2002 14:49:21 -0000 @@ -59,7 +59,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.IntegerField; import org.apache.poi.util.LittleEndianConsts; import org.apache.poi.util.LongField; @@ -99,7 +99,7 @@ public HeaderBlockWriter() { - _data = new byte[ PoiFSConstants.BIG_BLOCK_SIZE ]; + _data = new byte[ POIFSConstants.BIG_BLOCK_SIZE ]; Arrays.fill(_data, _default_value); new LongField(_signature_offset, _signature, _data); new IntegerField(0x08, 0, _data); @@ -115,15 +115,15 @@ new IntegerField(0x28, 0, _data); _bat_count = new IntegerField(_bat_count_offset, 0, _data); _property_start = new IntegerField(_property_start_offset, - PoiFSConstants.END_OF_CHAIN, + POIFSConstants.END_OF_CHAIN, _data); new IntegerField(0x34, 0, _data); new IntegerField(0x38, 0x1000, _data); _sbat_start = new IntegerField(_sbat_start_offset, - PoiFSConstants.END_OF_CHAIN, _data); + POIFSConstants.END_OF_CHAIN, _data); new IntegerField(0x40, 1, _data); _xbat_start = new IntegerField(_xbat_start_offset, - PoiFSConstants.END_OF_CHAIN, _data); + POIFSConstants.END_OF_CHAIN, _data); _xbat_count = new IntegerField(_xbat_count_offset, 0, _data); } @@ -170,7 +170,7 @@ else { rvalue = BATBlock.createXBATBlocks(new int[ 0 ], 0); - _xbat_start.set(PoiFSConstants.END_OF_CHAIN, _data); + _xbat_start.set(POIFSConstants.END_OF_CHAIN, _data); } _xbat_count.set(rvalue.length, _data); return rvalue; Index: src/java/org/apache/poi/poifs/storage/PropertyBlock.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/storage/PropertyBlock.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 PropertyBlock.java --- src/java/org/apache/poi/poifs/storage/PropertyBlock.java 31 Jan 2002 02:23:46 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/storage/PropertyBlock.java 14 Mar 2002 14:49:21 -0000 @@ -59,7 +59,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.property.Property; import org.apache.poi.util.IntegerField; import org.apache.poi.util.LittleEndian; @@ -75,7 +75,7 @@ extends BigBlock { private static final int _properties_per_block = - PoiFSConstants.BIG_BLOCK_SIZE / PoiFSConstants.PROPERTY_SIZE; + POIFSConstants.BIG_BLOCK_SIZE / POIFSConstants.PROPERTY_SIZE; private Property[] _properties; /** Index: src/java/org/apache/poi/poifs/storage/RawDataBlock.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/storage/RawDataBlock.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 RawDataBlock.java --- src/java/org/apache/poi/poifs/storage/RawDataBlock.java 31 Jan 2002 02:23:46 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/storage/RawDataBlock.java 14 Mar 2002 14:49:22 -0000 @@ -55,7 +55,7 @@ package org.apache.poi.poifs.storage; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import java.io.*; @@ -83,21 +83,21 @@ public RawDataBlock(final InputStream stream) throws IOException { - _data = new byte[ PoiFSConstants.BIG_BLOCK_SIZE ]; + _data = new byte[ POIFSConstants.BIG_BLOCK_SIZE ]; int count = stream.read(_data); if (count == -1) { _eof = true; } - else if (count != PoiFSConstants.BIG_BLOCK_SIZE) + else if (count != POIFSConstants.BIG_BLOCK_SIZE) { String type = " byte" + ((count == 1) ? ("") : ("s")); throw new IOException("Unable to read entire block; " + count + type + " read; expected " - + PoiFSConstants.BIG_BLOCK_SIZE + " bytes"); + + POIFSConstants.BIG_BLOCK_SIZE + " bytes"); } else { Index: src/java/org/apache/poi/poifs/storage/SmallDocumentBlock.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/poifs/storage/SmallDocumentBlock.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 SmallDocumentBlock.java --- src/java/org/apache/poi/poifs/storage/SmallDocumentBlock.java 31 Jan 2002 02:23:46 -0000 1.1.1.1 +++ src/java/org/apache/poi/poifs/storage/SmallDocumentBlock.java 14 Mar 2002 14:49:23 -0000 @@ -59,7 +59,7 @@ import java.util.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; /** * Storage for documents that are too small to use regular @@ -75,7 +75,7 @@ private static final byte _default_fill = ( byte ) 0xff; private static final int _block_size = 64; private static final int _blocks_per_big_block = - PoiFSConstants.BIG_BLOCK_SIZE / _block_size; + POIFSConstants.BIG_BLOCK_SIZE / _block_size; private SmallDocumentBlock(final byte [] data, final int index) { cvs server: Diffing src/java/org/apache/poi/util cvs server: Diffing src/models cvs server: Diffing src/records cvs server: Diffing src/records/definitions cvs server: Diffing src/records/styles cvs server: Diffing src/resources cvs server: Diffing src/resources/devtools cvs server: Diffing src/resources/entities cvs server: Diffing src/resources/entities/catalog-demo cvs server: Diffing src/scratchpad cvs server: Diffing src/scratchpad/lib cvs server: Diffing src/scratchpad/src cvs server: Diffing src/scratchpad/src/org cvs server: Diffing src/scratchpad/src/org/apache cvs server: Diffing src/scratchpad/src/org/apache/poi cvs server: Diffing src/scratchpad/src/org/apache/poi/generator cvs server: Diffing src/scratchpad/src/org/apache/poi/hdf cvs server: Diffing src/scratchpad/src/org/apache/poi/hdf/extractor cvs server: Diffing src/scratchpad/src/org/apache/poi/hdf/extractor/data cvs server: Diffing src/scratchpad/src/org/apache/poi/hdf/extractor/util cvs server: Diffing src/scratchpad/src/org/apache/poi/hdf/model cvs server: Diffing src/scratchpad/src/org/apache/poi/hdf/model/hdftypes cvs server: Diffing src/scratchpad/targets cvs server: Diffing src/targets cvs server: Diffing src/testcases cvs server: Diffing src/testcases/org cvs server: Diffing src/testcases/org/apache cvs server: Diffing src/testcases/org/apache/poi cvs server: Diffing src/testcases/org/apache/poi/hssf cvs server: Diffing src/testcases/org/apache/poi/hssf/data cvs server: Diffing src/testcases/org/apache/poi/hssf/record cvs server: Diffing src/testcases/org/apache/poi/hssf/usermodel cvs server: Diffing src/testcases/org/apache/poi/poifs cvs server: Diffing src/testcases/org/apache/poi/poifs/eventfilesystem cvs server: Diffing src/testcases/org/apache/poi/poifs/filesystem cvs server: Diffing src/testcases/org/apache/poi/poifs/property Index: src/testcases/org/apache/poi/poifs/property/TestDirectoryProperty.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/testcases/org/apache/poi/poifs/property/TestDirectoryProperty.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 TestDirectoryProperty.java --- src/testcases/org/apache/poi/poifs/property/TestDirectoryProperty.java 31 Jan 2002 02:23:52 -0000 1.1.1.1 +++ src/testcases/org/apache/poi/poifs/property/TestDirectoryProperty.java 14 Mar 2002 14:49:25 -0000 @@ -61,7 +61,7 @@ import junit.framework.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; /** * Class to test DirectoryProperty functionality Index: src/testcases/org/apache/poi/poifs/property/TestRootProperty.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/testcases/org/apache/poi/poifs/property/TestRootProperty.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 TestRootProperty.java --- src/testcases/org/apache/poi/poifs/property/TestRootProperty.java 31 Jan 2002 02:23:52 -0000 1.1.1.1 +++ src/testcases/org/apache/poi/poifs/property/TestRootProperty.java 14 Mar 2002 14:49:26 -0000 @@ -61,7 +61,7 @@ import junit.framework.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; /** * Class to test RootProperty functionality @@ -124,7 +124,7 @@ { _testblock[ index ] = ( byte ) 0; } - _testblock[ index++ ] = ( byte ) PoiFSConstants.END_OF_CHAIN; + _testblock[ index++ ] = ( byte ) POIFSConstants.END_OF_CHAIN; for (; index < 0x78; index++) { _testblock[ index ] = ( byte ) 0xff; cvs server: Diffing src/testcases/org/apache/poi/poifs/storage Index: src/testcases/org/apache/poi/poifs/storage/TestBlockAllocationTableReader.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/testcases/org/apache/poi/poifs/storage/TestBlockAllocationTableReader.ja va,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 TestBlockAllocationTableReader.java --- src/testcases/org/apache/poi/poifs/storage/TestBlockAllocationTableReader.java 31 Jan 2002 02:23:52 -0000 1.1.1.1 +++ src/testcases/org/apache/poi/poifs/storage/TestBlockAllocationTableReader.java 14 Mar 2002 14:49:35 -0000 @@ -61,7 +61,7 @@ import junit.framework.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -1209,15 +1209,15 @@ // create a document, minus the header block, and use that to // create a RawDataBlockList. The document will exist entire // of BATBlocks and XBATBlocks - // + // // we will create two XBAT blocks, which will encompass 128 // BAT blocks between them, and two extra BAT blocks which // will be in the block array passed to the constructor. This // makes a total of 130 BAT blocks, which will encompass // 16,640 blocks, for a file size of some 8.5 megabytes. - // + // // Naturally, we'll fake that out ... - // + // // map of blocks: // block 0: xbat block 0 // block 1: xbat block 1 @@ -1254,7 +1254,7 @@ else if (i % 256 == 255) { assertEquals("Verify end of chain for block " + i, - PoiFSConstants.END_OF_CHAIN, + POIFSConstants.END_OF_CHAIN, table.getNextBlockIndex(i)); } else @@ -1276,7 +1276,7 @@ { // strategy: - // + // // 1. set up a single BAT block from which to construct a // BAT. create nonsense blocks in the raw data block list // corresponding to the indices in the BAT block. Index: src/testcases/org/apache/poi/poifs/storage/TestBlockAllocationTableWriter.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/testcases/org/apache/poi/poifs/storage/TestBlockAllocationTableWriter.ja va,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 TestBlockAllocationTableWriter.java --- src/testcases/org/apache/poi/poifs/storage/TestBlockAllocationTableWriter.java 31 Jan 2002 02:23:52 -0000 1.1.1.1 +++ src/testcases/org/apache/poi/poifs/storage/TestBlockAllocationTableWriter.java 14 Mar 2002 14:49:36 -0000 @@ -61,7 +61,7 @@ import junit.framework.*; -import org.apache.poi.poifs.common.PoiFSConstants; +import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -189,7 +189,7 @@ offset += LittleEndianConsts.INT_SIZE; } LittleEndian.putInt(expected, offset, - PoiFSConstants.END_OF_CHAIN); + POIFSConstants.END_OF_CHAIN); offset += 4; block_index++; } @@ -197,7 +197,7 @@ // add BAT block indices LittleEndian.putInt(expected, offset, block_index++); offset += LittleEndianConsts.INT_SIZE; - LittleEndian.putInt(expected, offset, PoiFSConstants.END_OF_CHAIN); + LittleEndian.putInt(expected, offset, POIFSConstants.END_OF_CHAIN); for (int k = 0; k < expected.length; k++) { assertEquals("At offset " + k, expected[ k ], output[ k ]); cvs server: Diffing src/testcases/org/apache/poi/util cvs server: Diffing src/testcases/org/apache/poi/util/data cvs server: Diffing tools cvs server: Diffing tools/ant cvs server: Diffing tools/ant/bin cvs server: Diffing tools/ant/lib cvs server: Diffing tools/centipede cvs server: Diffing tools/centipede/lib cvs server: Diffing tools/centipede/src cvs server: Diffing tools/centipede/src/java cvs server: Diffing tools/centipede/src/resources cvs server: Diffing tools/centipede/src/resources/stylesheets cvs server: Diffing tools/centipede/targets cvs server: Diffing tools/cocoon cvs server: Diffing tools/cocoon/conf cvs server: Diffing tools/cocoon/lib cvs server: Diffing tools/lib cvs server: Diffing tools/targets cvs server: Diffing tools/targets/deprecated applied, don't forget to put your name in the @author tags in the future.. thanks I applied this a while ago... I think.. |