Link to the replacement constructions for the deprecated ones, and a few extra bits of JavaDoc

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1662979 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2015-02-28 17:49:18 +00:00
parent 2ccd6db57e
commit d9b5b0239e

View File

@ -68,14 +68,21 @@ public class EncryptionInfo {
public static BitField flagAES = BitFieldFactory.getInstance(0x20); public static BitField flagAES = BitFieldFactory.getInstance(0x20);
/**
* Opens for decryption
*/
public EncryptionInfo(POIFSFileSystem fs) throws IOException { public EncryptionInfo(POIFSFileSystem fs) throws IOException {
this(fs.getRoot()); this(fs.getRoot());
} }
/**
* Opens for decryption
*/
public EncryptionInfo(NPOIFSFileSystem fs) throws IOException { public EncryptionInfo(NPOIFSFileSystem fs) throws IOException {
this(fs.getRoot()); this(fs.getRoot());
} }
/**
* Opens for decryption
*/
public EncryptionInfo(DirectoryNode dir) throws IOException { public EncryptionInfo(DirectoryNode dir) throws IOException {
this(dir.createDocumentInputStream("EncryptionInfo"), false); this(dir.createDocumentInputStream("EncryptionInfo"), false);
} }
@ -131,7 +138,7 @@ public class EncryptionInfo {
} }
/** /**
* @deprecated use constructor without fs parameter * @deprecated Use {@link #EncryptionInfo(EncryptionMode)} (fs parameter no longer required)
*/ */
@Deprecated @Deprecated
public EncryptionInfo(POIFSFileSystem fs, EncryptionMode encryptionMode) { public EncryptionInfo(POIFSFileSystem fs, EncryptionMode encryptionMode) {
@ -139,7 +146,7 @@ public class EncryptionInfo {
} }
/** /**
* @deprecated use constructor without fs parameter * @deprecated Use {@link #EncryptionInfo(EncryptionMode)} (fs parameter no longer required)
*/ */
@Deprecated @Deprecated
public EncryptionInfo(NPOIFSFileSystem fs, EncryptionMode encryptionMode) { public EncryptionInfo(NPOIFSFileSystem fs, EncryptionMode encryptionMode) {
@ -147,7 +154,7 @@ public class EncryptionInfo {
} }
/** /**
* @deprecated use constructor without dir parameter * @deprecated Use {@link #EncryptionInfo(EncryptionMode)} (dir parameter no longer required)
*/ */
@Deprecated @Deprecated
public EncryptionInfo(DirectoryNode dir, EncryptionMode encryptionMode) { public EncryptionInfo(DirectoryNode dir, EncryptionMode encryptionMode) {
@ -155,7 +162,7 @@ public class EncryptionInfo {
} }
/** /**
* @deprecated use constructor without fs parameter * @deprecated use {@link #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode)}
*/ */
@Deprecated @Deprecated
public EncryptionInfo( public EncryptionInfo(
@ -171,7 +178,7 @@ public class EncryptionInfo {
} }
/** /**
* @deprecated use constructor without fs parameter * @deprecated use {@link #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode)}
*/ */
@Deprecated @Deprecated
public EncryptionInfo( public EncryptionInfo(
@ -187,7 +194,7 @@ public class EncryptionInfo {
} }
/** /**
* @deprecated use constructor without dir parameter * @deprecated use {@link #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode)}
*/ */
@Deprecated @Deprecated
public EncryptionInfo( public EncryptionInfo(
@ -202,6 +209,11 @@ public class EncryptionInfo {
this(encryptionMode, cipherAlgorithm, hashAlgorithm, keyBits, blockSize, chainingMode); this(encryptionMode, cipherAlgorithm, hashAlgorithm, keyBits, blockSize, chainingMode);
} }
/**
* Prepares for encryption, using the given Encryption Mode, and
* all other parameters as default.
* @see #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode)
*/
public EncryptionInfo(EncryptionMode encryptionMode) { public EncryptionInfo(EncryptionMode encryptionMode) {
this(encryptionMode, null, null, -1, -1, null); this(encryptionMode, null, null, -1, -1, null);
} }