Author: kiwiwings
Date: Tue Jun  5 22:44:18 2018
New Revision: 1832978

URL: http://svn.apache.org/viewvc?rev=1832978&view=rev
Log:
javadoc fixes

Modified:
    
poi/trunk/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java?rev=1832978&r1=1832977&r2=1832978&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java
 Tue Jun  5 22:44:18 2018
@@ -55,6 +55,11 @@ public class OLE2ScratchpadExtractorFact
      * out what format is desired
      * Note - doesn't check for core-supported formats!
      * Note - doesn't check for OOXML-supported formats
+     *
+     * @param poifsDir the directory node to be inspected
+     * @return the format specific text extractor
+     *
+     * @throws IOException when the format specific extraction fails because 
of invalid entires
      */
     public static POITextExtractor createExtractor(DirectoryNode poifsDir) 
throws IOException {
         if (poifsDir.hasEntry("WordDocument")) {
@@ -106,6 +111,12 @@ public class OLE2ScratchpadExtractorFact
      * If there are no embedded documents, you'll get back an
      *  empty array. Otherwise, you'll get one open
      *  {@link POITextExtractor} for each embedded file.
+     *
+     * @param ext the extractor holding the directory to start parsing
+     * @param dirs a list to be filled with directory references holding 
embedded
+     * @param nonPOIFS a list to be filled with streams which aren't based on 
POIFS entries
+     *
+     * @throws IOException when the format specific extraction fails because 
of invalid entires
      */
     public static void identifyEmbeddedResources(POIOLE2TextExtractor ext, 
List<Entry> dirs, List<InputStream> nonPOIFS) throws IOException {
         // Find all the embedded directories

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java?rev=1832978&r1=1832977&r2=1832978&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java Tue Jun  
5 22:44:18 2018
@@ -101,13 +101,19 @@ public final class HDGFDiagram extends P
        /**
         * Returns the TrailerStream, which is at the root of the
         *  tree of Streams.
+        *
+        * @return the TrailerStream
         */
        public TrailerStream getTrailerStream() { return trailer; }
+
        /**
         * Returns all the top level streams, which are the streams
         *  pointed to by the TrailerStream.
+        *
+        * @return the top level streams
         */
        public Stream[] getTopLevelStreams() { return 
trailer.getPointedToStreams(); }
+
        public long getDocumentSize() { return docSize; }
 
        /**
@@ -154,15 +160,4 @@ public final class HDGFDiagram extends P
                        }
                }
        }
-
-       /**
-        * For testing only
-        */
-       public static void main(String args[]) throws Exception {
-               NPOIFSFileSystem pfs = new NPOIFSFileSystem(new File(args[0]));
-               HDGFDiagram hdgf = new HDGFDiagram(pfs);
-               hdgf.debug();
-               hdgf.close();
-               pfs.close();
-       }
 }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java?rev=1832978&r1=1832977&r2=1832978&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java Tue Jun  5 
22:44:18 2018
@@ -46,6 +46,11 @@ public class HDGFLZW extends LZWDecompre
    /**
     * Compress the given input stream, returning the array of bytes
     *  of the compressed input
+    *
+    * @param src the compression source byte
+    * @return the compressed stream as bytes
+    *
+    * @throws IOException when the InputStream can't be read
     */
    public byte[] compress(InputStream src) throws IOException {
       ByteArrayOutputStream res = new ByteArrayOutputStream();
@@ -76,6 +81,12 @@ public class HDGFLZW extends LZWDecompre
 
    /**
     * Performs the Visio compatible streaming LZW compression.
+    *
+    * @param src the input bytes for the compression
+    * @param res the OutputStream which receives the compressed bytes
+    *
+    * @throws IOException when the InputStream can't be read
+    *    or the OutputStream can't be written to
     */
    public void compress(InputStream src, OutputStream res) throws IOException {
       HDGFLZWCompressor c = new HDGFLZWCompressor();

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java?rev=1832978&r1=1832977&r2=1832978&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java Tue Jun  
5 22:44:18 2018
@@ -60,29 +60,47 @@ public final class Chunk {
        public byte[] _getContents() {
                return contents;
        }
+
        public ChunkHeader getHeader() {
                return header;
        }
-       /** Gets the separator between this chunk and the next, if it exists */
+
+       /**
+        * Gets the separator between this chunk and the next, if it exists
+        *
+        * @return the separator
+        */
        public ChunkSeparator getSeparator() {
                return separator;
        }
-       /** Gets the trailer for this chunk, if it exists */
+
+       /**
+        * Gets the trailer for this chunk, if it exists
+        *
+        * @return the trailer
+        */
        public ChunkTrailer getTrailer() {
                return trailer;
        }
+
        /**
         * Gets the command definitions, which define and describe much
         *  of the data held by the chunk.
+        *
+        * @return the command definitions
         */
        public CommandDefinition[] getCommandDefinitions() {
                return commandDefinitions;
        }
+
        public Command[] getCommands() {
                return commands;
        }
+
        /**
         * Get the name of the chunk, as found from the CommandDefinitions
+        *
+        * @return the name of the chunk
         */
        public String getName() {
                return name;
@@ -91,6 +109,8 @@ public final class Chunk {
        /**
         * Returns the size of the chunk, including any
         *  headers, trailers and separators.
+        *
+        * @return the size of the chunk
         */
        public int getOnDiskSize() {
                int size = header.getSizeInBytes() + contents.length;

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java?rev=1832978&r1=1832977&r2=1832978&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java 
Tue Jun  5 22:44:18 2018
@@ -128,8 +128,11 @@ public final class ChunkFactory {
 
        /**
         * Creates the appropriate chunk at the given location.
-        * @param data
-        * @param offset
+        *
+        * @param data the chunk bytes
+        * @param offset the offset into the chunk bytes array to start reading 
from
+        *
+        * @return the new Chunk
         */
        public Chunk createChunk(byte[] data, int offset) {
                // Create the header

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java?rev=1832978&r1=1832977&r2=1832978&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java 
Tue Jun  5 22:44:18 2018
@@ -33,6 +33,11 @@ public abstract class ChunkHeader {
        /**
         * Creates the appropriate ChunkHeader for the Chunk Header at
         *  the given location, for the given document version.
+        *
+        * @param documentVersion the documentVersion - 4 and higher is 
supported
+        * @param data the chunk data
+        * @param offset the start offset in the chunk data
+        * @return the ChunkHeader
         */
        public static ChunkHeader createChunkHeader(int documentVersion, byte[] 
data, int offset) {
                if(documentVersion >= 6) {
@@ -68,6 +73,10 @@ public abstract class ChunkHeader {
 
        /**
         * Returns the size of a chunk header for the given document version.
+        *
+        * @param documentVersion the documentVersion - 4 and higher is 
supported
+        *
+        * @return the header size
         */
        public static int getHeaderSize(int documentVersion) {
                if(documentVersion > 6) {
@@ -85,7 +94,7 @@ public abstract class ChunkHeader {
        public abstract Charset getChunkCharset();
 
        /**
-        * Returns the ID/IX of the chunk
+        * @return the ID/IX of the chunk
         */
        public int getId() {
                return id;
@@ -94,6 +103,8 @@ public abstract class ChunkHeader {
        /**
         * Returns the length of the trunk, excluding the length
         *  of the header, trailer or separator.
+        *
+        * @return the length of the trunk
         */
        public int getLength() {
                return length;
@@ -102,6 +113,8 @@ public abstract class ChunkHeader {
        /**
         * Returns the type of the chunk, which affects the
         *  mandatory information
+        *
+        * @return the type of the chunk
         */
        public int getType() {
                return type;



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to