Add/update some JavaDoc

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898385 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2022-02-24 18:12:39 +00:00
parent ba238f4172
commit 116c3e91ad
18 changed files with 59 additions and 56 deletions

View File

@ -48,11 +48,11 @@ public final class PackageHelper {
}
/**
* @param stream
* @param stream The InputStream to read from
* @param closeStream whether to close the stream (default is false)
* @since POI 5.2.0
* @return OPCPackage
* @throws IOException
* @throws IOException If reading data from the stream fails
*/
public static OPCPackage open(InputStream stream, boolean closeStream) throws IOException {
try {

View File

@ -128,7 +128,7 @@ public class XMLSlideShow extends POIXMLDocument
/**
* @param is InputStream
* @throws IOException
* @throws IOException If reading data from the stream fails
* @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
* @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
* input format

View File

@ -119,7 +119,9 @@ public class XSSFReader {
/**
* Controls whether {@link #getSharedStringsTable()} uses {@link SharedStringsTable}
* or {@link ReadOnlySharedStringsTable}.
* @param useReadOnlySharedStringsTable
*
* @param useReadOnlySharedStringsTable if true, the ReadOnlySharedStringsTable is used,
* SharedStringsTable otherwise
* @since POI 5.2.0
*/
public void setUseReadOnlySharedStringsTable(boolean useReadOnlySharedStringsTable) {

View File

@ -244,7 +244,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su
* footprint than an InputStream backed one.
*
* @param pkg the OpenXML4J {@code OPC Package} object.
* @throws IOException
* @throws IOException If reading data from the package fails
* @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
* @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
* input format
@ -276,7 +276,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su
* pkg.close(); // gracefully closes the underlying zip file
* }</pre>
*
* @throws IOException
* @throws IOException If reading data from the stream fails
* @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
* @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
* input format
@ -300,8 +300,8 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su
* than opening from an InputStream
*
* @param file the file to open
* @throws IOException
* @throws InvalidFormatException
* @throws IOException If reading data from the file fails
* @throws InvalidFormatException If the file has a format that cannot be read or if the file is corrupted
* @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
* @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
* input format
@ -322,7 +322,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su
* than opening from an InputStream
*
* @param path the file name.
* @throws IOException
* @throws IOException If reading data from the file fails
* @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
* @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
* input format
@ -335,7 +335,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su
/**
* Constructs a XSSFWorkbook object using Package Part.
* @param part package part
* @throws IOException
* @throws IOException If reading data from the Package Part fails
* @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
* @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
* input format

View File

@ -133,7 +133,7 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
/**
* @param pkg OPC package
* @throws IOException
* @throws IOException If reading data from the package fails
* @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
* @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
* input format
@ -146,8 +146,8 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
}
/**
* @param is InputStream
* @throws IOException
* @param is The InputStream to read data from
* @throws IOException If reading data from the stream fails
* @throws POIXMLException a RuntimeException that can be caused by invalid OOXML data
* @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
* input format

View File

@ -208,8 +208,9 @@ public class HemfPicture implements Iterable<HemfRecord>, GenericRecord {
}
/**
* @param ctx
* @param graphicsBounds
* @param ctx The Graphics-context to draw on
* @param graphicsBounds A rectangle which describes the bounds
* for drawing
* @throws IllegalStateException if the draw fails
*/
public void draw(Graphics2D ctx, Rectangle2D graphicsBounds) {

View File

@ -50,7 +50,7 @@ public final class HMEFMessage {
/**
* @param inp input stream
* @throws IOException
* @throws IOException If reading data from the stream fails
* @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
* input format
*/

View File

@ -41,7 +41,7 @@ import org.apache.poi.util.Units;
public abstract class Bitmap extends HSLFPictureData {
/**
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], PictureType)} or one of its overloads to create new
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)} or one of its overloads to create new
* {@link Bitmap}. This API led to detached {@link Bitmap} instances (See Bugzilla
* 46122) and prevented adding additional functionality.
*/

View File

@ -37,7 +37,7 @@ public final class DIB extends Bitmap {
private static final int HEADER_SIZE = 14;
/**
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], PictureType)} or one of its overloads to create new
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)} or one of its overloads to create new
* {@link DIB}. This API led to detached {@link DIB} instances (See Bugzilla
* 46122) and prevented adding additional functionality.
*/

View File

@ -40,7 +40,7 @@ import org.apache.poi.util.Units;
public final class EMF extends Metafile {
/**
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], PictureType)} or one of its overloads to create new
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)} or one of its overloads to create new
* EMF. This API led to detached EMF instances (See Bugzilla
* 46122) and prevented adding additional functionality.
*/

View File

@ -34,7 +34,7 @@ public final class JPEG extends Bitmap {
private ColorSpace colorSpace = ColorSpace.rgb;
/**
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], PictureType)} or one of its overloads to create new
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)} or one of its overloads to create new
* {@link JPEG}. This API led to detached {@link JPEG} instances (See Bugzilla
* 46122) and prevented adding additional functionality.
*/

View File

@ -47,7 +47,7 @@ public final class PICT extends Metafile {
private static final Logger LOG = LogManager.getLogger(PICT.class);
/**
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], PictureType)} or one of its overloads to create new
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)} or one of its overloads to create new
* PICT. This API led to detached PICT instances (See Bugzilla
* 46122) and prevented adding additional functionality.
*/

View File

@ -30,7 +30,7 @@ import org.apache.poi.util.Removal;
public final class PNG extends Bitmap {
/**
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], PictureType)} or one of its overloads to create new
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)} or one of its overloads to create new
* {@link PNG}. This API led to detached {@link PNG} instances (See Bugzilla
* 46122) and prevented adding additional functionality.
*/

View File

@ -40,7 +40,7 @@ import org.apache.poi.util.Units;
public final class WMF extends Metafile {
/**
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], PictureType)} or one of its overloads to create new
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)} or one of its overloads to create new
* WMF. This API led to detached WMF instances (See Bugzilla
* 46122) and prevented adding additional functionality.
*/

View File

@ -110,7 +110,7 @@ public abstract class HSLFPictureData implements PictureData, GenericRecord {
final EscherBSERecord bse;
/**
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], PictureType)} or one of its overloads to create new
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)} or one of its overloads to create new
* {@link HSLFPictureData}. This API led to detached {@link HSLFPictureData} instances (See Bugzilla
* 46122) and prevented adding additional functionality.
*/
@ -252,7 +252,7 @@ public abstract class HSLFPictureData implements PictureData, GenericRecord {
*
* @param type type of picture.
* @return concrete instance of {@link HSLFPictureData}.
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], PictureType)} or one of its overloads to create new
* @deprecated Use {@link HSLFSlideShow#addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)} or one of its overloads to create new
* {@link HSLFPictureData}. This API led to detached {@link HSLFPictureData} instances (See Bugzilla
* 46122) and prevented adding additional functionality.
*/

View File

@ -166,7 +166,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
/**
* Constructs a Powerpoint document from an input stream.
* @throws IOException
* @throws IOException If reading data from the stream fails
* @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
* input format
*/
@ -177,7 +177,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
/**
* Constructs a Powerpoint document from an POIFSFileSystem.
* @throws IOException
* @throws IOException If reading data from the file-system fails
* @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
* input format
*/
@ -188,7 +188,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
/**
* Constructs a Powerpoint document from an DirectoryNode.
* @throws IOException
* @throws IOException If reading data from the DirectoryNode fails
* @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
* input format
*/

View File

@ -81,8 +81,8 @@ public class HwmfPicture implements Iterable<HwmfRecord>, GenericRecord {
}
/**
* @param inputStream
* @throws IOException
* @param inputStream The InputStream to read data from
* @throws IOException If reading data from the file fails
* @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
* input format
*/

View File

@ -195,7 +195,7 @@ public class POIFSFileSystem extends BlockStore
*
* @param channel the FileChannel from which to read the data
* @throws IOException on errors reading, or on invalid data
* @see POIFSFileSystem(FileChannel, boolean, boolean) this constructor gives more control over whether to
* @see #POIFSFileSystem(FileChannel, boolean, boolean) this constructor gives more control over whether to
* close the provided channel
*/
public POIFSFileSystem(FileChannel channel)
@ -215,7 +215,7 @@ public class POIFSFileSystem extends BlockStore
* @param channel the FileChannel from which to read or read/write the data
* @param readOnly whether the POIFileSystem will only be used in read-only mode
* @throws IOException on errors reading, or on invalid data
* @see POIFSFileSystem(FileChannel, boolean, boolean) this constructor gives more control over whether to
* @see #POIFSFileSystem(FileChannel, boolean, boolean) this constructor gives more control over whether to
* close the provided channel
*/
public POIFSFileSystem(FileChannel channel, boolean readOnly)