Package org.jmol.awtjs2d
Class JSFile
- java.lang.Object
-
- org.jmol.awtjs2d.JSFile
-
- All Implemented Interfaces:
javajs.api.GenericFileInterface
public class JSFile extends java.lang.Object implements javajs.api.GenericFileInterface
A class that mimics java.io.File We allow access to
-
-
Constructor Summary
Constructors Constructor Description JSFile(java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFullPath()
java.lang.String
getName()
javajs.api.GenericFileInterface
getParentAsFile()
static java.lang.Object
getURLContents(java.net.URL url, byte[] outputBytes, java.lang.String post)
Note that the JS equivalent passes back a javajs.util.SBboolean
isDirectory()
long
length()
(package private) static javajs.api.GenericFileInterface
newFile(java.lang.String name)
-
-
-
Method Detail
-
newFile
static javajs.api.GenericFileInterface newFile(java.lang.String name)
-
getParentAsFile
public javajs.api.GenericFileInterface getParentAsFile()
- Specified by:
getParentAsFile
in interfacejavajs.api.GenericFileInterface
-
getFullPath
public java.lang.String getFullPath()
- Specified by:
getFullPath
in interfacejavajs.api.GenericFileInterface
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfacejavajs.api.GenericFileInterface
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectory
in interfacejavajs.api.GenericFileInterface
-
length
public long length()
- Specified by:
length
in interfacejavajs.api.GenericFileInterface
-
getURLContents
public static java.lang.Object getURLContents(java.net.URL url, byte[] outputBytes, java.lang.String post)
Note that the JS equivalent passes back a javajs.util.SB- Parameters:
url
-outputBytes
-post
-- Returns:
- javajs.util.SB or
-
-