Author: mturk
Date: Mon Apr 20 14:13:43 2009
New Revision: 766702
URL: http://svn.apache.org/viewvc?rev=766702&view=rev
Log:
Add UnsupportedOperationException to the throwables
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java?rev=766702&r1=766701&r2=766702&view=diff
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java
(original)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java
Mon Apr 20 14:13:43 2009
@@ -34,9 +34,11 @@
private static native int ftype0(String pathname)
throws IOException, SecurityException;
private static native boolean mkslink0(String target, String link)
- throws IOException, SecurityException;
+ throws IOException, SecurityException,
+ UnsupportedOperationException;
private static native String target0(String link)
- throws IOException, SecurityException;
+ throws IOException, SecurityException,
+ UnsupportedOperationException;
// Catched FileType Enum integer value.
private int fileType = -1;
@@ -219,9 +221,11 @@
* @throws SecurityException if Write access to the directory containing
* {...@code link} is denied, or one of the directories in the
* path prefix of {...@code link} did not allow search permission.
+ * @throws UnsupportedOperationException if the operating system doesn't
+ * support symbolic links.
*/
public static boolean createSymbolicLink(String target, String link)
- throws IOException, SecurityException
+ throws IOException, SecurityException, UnsupportedOperationException
{
return mkslink0(target, link);
}
@@ -253,9 +257,11 @@
* @throws SecurityException if Write access to the directory containing
* {...@code link} is denied, or one of the directories in the
* path prefix of {...@code link} did not allow search permission.
+ * @throws UnsupportedOperationException if the operating system doesn't
+ * support symbolic links.
*/
public File createSymbolicLink(String link)
- throws IOException, SecurityException
+ throws IOException, SecurityException, UnsupportedOperationException
{
// False means EEXIST, so just consider it opened
// Check is made wather it points to the same target
@@ -276,9 +282,11 @@
* or an I/O error occured.
* @throws SecurityException if search permission is denied for a
* component of this abstract {...@code File} pathname prefix.
+ * @throws UnsupportedOperationException if the operating system doesn't
+ * support symbolic links.
*/
public String getTargetPath()
- throws IOException, SecurityException
+ throws IOException, SecurityException, UnsupportedOperationException
{
return target0(getPath());
}
@@ -292,9 +300,11 @@
* or an I/O error occured.
* @throws SecurityException if search permission is denied for a
* component of this abstract {...@code File} pathname prefix.
+ * @throws UnsupportedOperationException if the operating system doesn't
+ * support symbolic links.
*/
public File getTargetFile()
- throws IOException, SecurityException
+ throws IOException, SecurityException, UnsupportedOperationException
{
return new File(getTargetPath());
}