diff options
Diffstat (limited to 'netx/javax/jnlp')
-rw-r--r-- | netx/javax/jnlp/BasicService.java | 13 | ||||
-rw-r--r-- | netx/javax/jnlp/ClipboardService.java | 7 | ||||
-rw-r--r-- | netx/javax/jnlp/DownloadService.java | 49 | ||||
-rw-r--r-- | netx/javax/jnlp/DownloadServiceListener.java | 13 | ||||
-rw-r--r-- | netx/javax/jnlp/ExtensionInstallerService.java | 40 | ||||
-rw-r--r-- | netx/javax/jnlp/FileContents.java | 28 | ||||
-rw-r--r-- | netx/javax/jnlp/FileOpenService.java | 7 | ||||
-rw-r--r-- | netx/javax/jnlp/FileSaveService.java | 7 | ||||
-rw-r--r-- | netx/javax/jnlp/JNLPRandomAccessFile.java | 112 | ||||
-rw-r--r-- | netx/javax/jnlp/PersistenceService.java | 24 | ||||
-rw-r--r-- | netx/javax/jnlp/PrintService.java | 13 | ||||
-rw-r--r-- | netx/javax/jnlp/ServiceManager.java | 64 | ||||
-rw-r--r-- | netx/javax/jnlp/ServiceManagerStub.java | 7 | ||||
-rw-r--r-- | netx/javax/jnlp/UnavailableServiceException.java | 14 |
14 files changed, 228 insertions, 170 deletions
diff --git a/netx/javax/jnlp/BasicService.java b/netx/javax/jnlp/BasicService.java index cb9a445..b04691e 100644 --- a/netx/javax/jnlp/BasicService.java +++ b/netx/javax/jnlp/BasicService.java @@ -1,12 +1,13 @@ - - package javax.jnlp; public interface BasicService { - public java.net.URL getCodeBase(); - public boolean isOffline(); - public boolean showDocument(java.net.URL url); - public boolean isWebBrowserSupported(); + public java.net.URL getCodeBase(); + + public boolean isOffline(); + + public boolean showDocument(java.net.URL url); + + public boolean isWebBrowserSupported(); } diff --git a/netx/javax/jnlp/ClipboardService.java b/netx/javax/jnlp/ClipboardService.java index cada884..3d3696f 100644 --- a/netx/javax/jnlp/ClipboardService.java +++ b/netx/javax/jnlp/ClipboardService.java @@ -1,10 +1,9 @@ - - package javax.jnlp; public interface ClipboardService { - public java.awt.datatransfer.Transferable getContents(); - public void setContents(java.awt.datatransfer.Transferable contents); + public java.awt.datatransfer.Transferable getContents(); + + public void setContents(java.awt.datatransfer.Transferable contents); } diff --git a/netx/javax/jnlp/DownloadService.java b/netx/javax/jnlp/DownloadService.java index 6710fc6..558b9b4 100644 --- a/netx/javax/jnlp/DownloadService.java +++ b/netx/javax/jnlp/DownloadService.java @@ -1,24 +1,37 @@ - - package javax.jnlp; public interface DownloadService { - public boolean isResourceCached(java.net.URL ref, java.lang.String version); - public boolean isPartCached(java.lang.String part); - public boolean isPartCached(java.lang.String[] parts); - public boolean isExtensionPartCached(java.net.URL ref, java.lang.String version, java.lang.String part); - public boolean isExtensionPartCached(java.net.URL ref, java.lang.String version, java.lang.String[] parts); - public void loadResource(java.net.URL ref, java.lang.String version, DownloadServiceListener progress) throws java.io.IOException; - public void loadPart(java.lang.String part, DownloadServiceListener progress) throws java.io.IOException; - public void loadPart(java.lang.String[] parts, DownloadServiceListener progress) throws java.io.IOException; - public void loadExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String part, DownloadServiceListener progress) throws java.io.IOException; - public void loadExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String[] parts, DownloadServiceListener progress) throws java.io.IOException; - public void removeResource(java.net.URL ref, java.lang.String version) throws java.io.IOException; - public void removePart(java.lang.String part) throws java.io.IOException; - public void removePart(java.lang.String[] parts) throws java.io.IOException; - public void removeExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String part) throws java.io.IOException; - public void removeExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String[] parts) throws java.io.IOException; - public DownloadServiceListener getDefaultProgressWindow(); + public boolean isResourceCached(java.net.URL ref, java.lang.String version); + + public boolean isPartCached(java.lang.String part); + + public boolean isPartCached(java.lang.String[] parts); + + public boolean isExtensionPartCached(java.net.URL ref, java.lang.String version, java.lang.String part); + + public boolean isExtensionPartCached(java.net.URL ref, java.lang.String version, java.lang.String[] parts); + + public void loadResource(java.net.URL ref, java.lang.String version, DownloadServiceListener progress) throws java.io.IOException; + + public void loadPart(java.lang.String part, DownloadServiceListener progress) throws java.io.IOException; + + public void loadPart(java.lang.String[] parts, DownloadServiceListener progress) throws java.io.IOException; + + public void loadExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String part, DownloadServiceListener progress) throws java.io.IOException; + + public void loadExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String[] parts, DownloadServiceListener progress) throws java.io.IOException; + + public void removeResource(java.net.URL ref, java.lang.String version) throws java.io.IOException; + + public void removePart(java.lang.String part) throws java.io.IOException; + + public void removePart(java.lang.String[] parts) throws java.io.IOException; + + public void removeExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String part) throws java.io.IOException; + + public void removeExtensionPart(java.net.URL ref, java.lang.String version, java.lang.String[] parts) throws java.io.IOException; + + public DownloadServiceListener getDefaultProgressWindow(); } diff --git a/netx/javax/jnlp/DownloadServiceListener.java b/netx/javax/jnlp/DownloadServiceListener.java index 4d0fba3..519161f 100644 --- a/netx/javax/jnlp/DownloadServiceListener.java +++ b/netx/javax/jnlp/DownloadServiceListener.java @@ -1,12 +1,13 @@ - - package javax.jnlp; public interface DownloadServiceListener { - public void progress(java.net.URL url, java.lang.String version, long readSoFar, long total, int overallPercent); - public void validating(java.net.URL url, java.lang.String version, long entry, long total, int overallPercent); - public void upgradingArchive(java.net.URL url, java.lang.String version, int patchPercent, int overallPercent); - public void downloadFailed(java.net.URL url, java.lang.String version); + public void progress(java.net.URL url, java.lang.String version, long readSoFar, long total, int overallPercent); + + public void validating(java.net.URL url, java.lang.String version, long entry, long total, int overallPercent); + + public void upgradingArchive(java.net.URL url, java.lang.String version, int patchPercent, int overallPercent); + + public void downloadFailed(java.net.URL url, java.lang.String version); } diff --git a/netx/javax/jnlp/ExtensionInstallerService.java b/netx/javax/jnlp/ExtensionInstallerService.java index a3b686c..d968167 100644 --- a/netx/javax/jnlp/ExtensionInstallerService.java +++ b/netx/javax/jnlp/ExtensionInstallerService.java @@ -1,21 +1,31 @@ - - package javax.jnlp; public interface ExtensionInstallerService { - public java.lang.String getInstallPath(); - public java.lang.String getExtensionVersion(); - public java.net.URL getExtensionLocation(); - public void hideProgressBar(); - public void hideStatusWindow(); - public void setHeading(java.lang.String heading); - public void setStatus(java.lang.String status); - public void updateProgress(int value); - public void installSucceeded(boolean needsReboot); - public void installFailed(); - public void setJREInfo(java.lang.String platformVersion, java.lang.String jrePath); - public void setNativeLibraryInfo(java.lang.String path); - public java.lang.String getInstalledJRE(java.net.URL url, java.lang.String version); + public java.lang.String getInstallPath(); + + public java.lang.String getExtensionVersion(); + + public java.net.URL getExtensionLocation(); + + public void hideProgressBar(); + + public void hideStatusWindow(); + + public void setHeading(java.lang.String heading); + + public void setStatus(java.lang.String status); + + public void updateProgress(int value); + + public void installSucceeded(boolean needsReboot); + + public void installFailed(); + + public void setJREInfo(java.lang.String platformVersion, java.lang.String jrePath); + + public void setNativeLibraryInfo(java.lang.String path); + + public java.lang.String getInstalledJRE(java.net.URL url, java.lang.String version); } diff --git a/netx/javax/jnlp/FileContents.java b/netx/javax/jnlp/FileContents.java index a612202..4658dff 100644 --- a/netx/javax/jnlp/FileContents.java +++ b/netx/javax/jnlp/FileContents.java @@ -1,17 +1,23 @@ - - package javax.jnlp; public interface FileContents { - public java.lang.String getName() throws java.io.IOException; - public java.io.InputStream getInputStream() throws java.io.IOException; - public java.io.OutputStream getOutputStream(boolean overwrite) throws java.io.IOException; - public long getLength() throws java.io.IOException; - public boolean canRead() throws java.io.IOException; - public boolean canWrite() throws java.io.IOException; - public JNLPRandomAccessFile getRandomAccessFile(java.lang.String mode) throws java.io.IOException; - public long getMaxLength() throws java.io.IOException; - public long setMaxLength(long maxlength) throws java.io.IOException; + public java.lang.String getName() throws java.io.IOException; + + public java.io.InputStream getInputStream() throws java.io.IOException; + + public java.io.OutputStream getOutputStream(boolean overwrite) throws java.io.IOException; + + public long getLength() throws java.io.IOException; + + public boolean canRead() throws java.io.IOException; + + public boolean canWrite() throws java.io.IOException; + + public JNLPRandomAccessFile getRandomAccessFile(java.lang.String mode) throws java.io.IOException; + + public long getMaxLength() throws java.io.IOException; + + public long setMaxLength(long maxlength) throws java.io.IOException; } diff --git a/netx/javax/jnlp/FileOpenService.java b/netx/javax/jnlp/FileOpenService.java index 1ca5ee9..d31fd35 100644 --- a/netx/javax/jnlp/FileOpenService.java +++ b/netx/javax/jnlp/FileOpenService.java @@ -1,10 +1,9 @@ - - package javax.jnlp; public interface FileOpenService { - public FileContents openFileDialog(java.lang.String pathHint, java.lang.String[] extensions) throws java.io.IOException; - public FileContents[] openMultiFileDialog(java.lang.String pathHint, java.lang.String[] extensions) throws java.io.IOException; + public FileContents openFileDialog(java.lang.String pathHint, java.lang.String[] extensions) throws java.io.IOException; + + public FileContents[] openMultiFileDialog(java.lang.String pathHint, java.lang.String[] extensions) throws java.io.IOException; } diff --git a/netx/javax/jnlp/FileSaveService.java b/netx/javax/jnlp/FileSaveService.java index b06d761..d27201c 100644 --- a/netx/javax/jnlp/FileSaveService.java +++ b/netx/javax/jnlp/FileSaveService.java @@ -1,10 +1,9 @@ - - package javax.jnlp; public interface FileSaveService { - public FileContents saveFileDialog(java.lang.String pathHint, java.lang.String[] extensions, java.io.InputStream stream, java.lang.String name) throws java.io.IOException; - public FileContents saveAsFileDialog(java.lang.String pathHint, java.lang.String[] extensions, FileContents contents) throws java.io.IOException; + public FileContents saveFileDialog(java.lang.String pathHint, java.lang.String[] extensions, java.io.InputStream stream, java.lang.String name) throws java.io.IOException; + + public FileContents saveAsFileDialog(java.lang.String pathHint, java.lang.String[] extensions, FileContents contents) throws java.io.IOException; } diff --git a/netx/javax/jnlp/JNLPRandomAccessFile.java b/netx/javax/jnlp/JNLPRandomAccessFile.java index 3d67fce..ad7d431 100644 --- a/netx/javax/jnlp/JNLPRandomAccessFile.java +++ b/netx/javax/jnlp/JNLPRandomAccessFile.java @@ -1,45 +1,79 @@ - - package javax.jnlp; + public interface JNLPRandomAccessFile extends java.io.DataInput, java.io.DataOutput { + public void close() throws java.io.IOException; + + public long length() throws java.io.IOException; + + public long getFilePointer() throws java.io.IOException; + + public int read() throws java.io.IOException; + + public int read(byte[] b, int off, int len) throws java.io.IOException; + + public int read(byte[] b) throws java.io.IOException; + + public void readFully(byte[] b) throws java.io.IOException; + + public void readFully(byte[] b, int off, int len) throws java.io.IOException; + + public int skipBytes(int n) throws java.io.IOException; + + public boolean readBoolean() throws java.io.IOException; + + public byte readByte() throws java.io.IOException; + + public int readUnsignedByte() throws java.io.IOException; + + public short readShort() throws java.io.IOException; + + public int readUnsignedShort() throws java.io.IOException; + + public char readChar() throws java.io.IOException; + + public int readInt() throws java.io.IOException; + + public long readLong() throws java.io.IOException; + + public float readFloat() throws java.io.IOException; + + public double readDouble() throws java.io.IOException; + + public java.lang.String readLine() throws java.io.IOException; + + public java.lang.String readUTF() throws java.io.IOException; + + public void seek(long pos) throws java.io.IOException; + + public void setLength(long newLength) throws java.io.IOException; + + public void write(int b) throws java.io.IOException; + + public void write(byte[] b) throws java.io.IOException; + + public void write(byte[] b, int off, int len) throws java.io.IOException; + + public void writeBoolean(boolean v) throws java.io.IOException; + + public void writeByte(int v) throws java.io.IOException; + + public void writeShort(int v) throws java.io.IOException; + + public void writeChar(int v) throws java.io.IOException; + + public void writeInt(int v) throws java.io.IOException; + + public void writeLong(long v) throws java.io.IOException; + + public void writeFloat(float v) throws java.io.IOException; + + public void writeDouble(double v) throws java.io.IOException; + + public void writeBytes(java.lang.String s) throws java.io.IOException; + + public void writeChars(java.lang.String s) throws java.io.IOException; - public void close() throws java.io.IOException; - public long length() throws java.io.IOException; - public long getFilePointer() throws java.io.IOException; - public int read() throws java.io.IOException; - public int read(byte[] b, int off, int len) throws java.io.IOException; - public int read(byte[] b) throws java.io.IOException; - public void readFully(byte[] b) throws java.io.IOException; - public void readFully(byte[] b, int off, int len) throws java.io.IOException; - public int skipBytes(int n) throws java.io.IOException; - public boolean readBoolean() throws java.io.IOException; - public byte readByte() throws java.io.IOException; - public int readUnsignedByte() throws java.io.IOException; - public short readShort() throws java.io.IOException; - public int readUnsignedShort() throws java.io.IOException; - public char readChar() throws java.io.IOException; - public int readInt() throws java.io.IOException; - public long readLong() throws java.io.IOException; - public float readFloat() throws java.io.IOException; - public double readDouble() throws java.io.IOException; - public java.lang.String readLine() throws java.io.IOException; - public java.lang.String readUTF() throws java.io.IOException; - public void seek(long pos) throws java.io.IOException; - public void setLength(long newLength) throws java.io.IOException; - public void write(int b) throws java.io.IOException; - public void write(byte[] b) throws java.io.IOException; - public void write(byte[] b, int off, int len) throws java.io.IOException; - public void writeBoolean(boolean v) throws java.io.IOException; - public void writeByte(int v) throws java.io.IOException; - public void writeShort(int v) throws java.io.IOException; - public void writeChar(int v) throws java.io.IOException; - public void writeInt(int v) throws java.io.IOException; - public void writeLong(long v) throws java.io.IOException; - public void writeFloat(float v) throws java.io.IOException; - public void writeDouble(double v) throws java.io.IOException; - public void writeBytes(java.lang.String s) throws java.io.IOException; - public void writeChars(java.lang.String s) throws java.io.IOException; - public void writeUTF(java.lang.String str) throws java.io.IOException; + public void writeUTF(java.lang.String str) throws java.io.IOException; } diff --git a/netx/javax/jnlp/PersistenceService.java b/netx/javax/jnlp/PersistenceService.java index 008c670..10de8e6 100644 --- a/netx/javax/jnlp/PersistenceService.java +++ b/netx/javax/jnlp/PersistenceService.java @@ -1,17 +1,21 @@ - package javax.jnlp; public interface PersistenceService { - public static final int CACHED = 0; - public static final int TEMPORARY = 1; - public static final int DIRTY = 2; + public static final int CACHED = 0; + public static final int TEMPORARY = 1; + public static final int DIRTY = 2; + + public long create(java.net.URL url, long maxsize) throws java.net.MalformedURLException, java.io.IOException; + + public FileContents get(java.net.URL url) throws java.net.MalformedURLException, java.io.IOException, java.io.FileNotFoundException; + + public void delete(java.net.URL url) throws java.net.MalformedURLException, java.io.IOException; + + public java.lang.String[] getNames(java.net.URL url) throws java.net.MalformedURLException, java.io.IOException; + + public int getTag(java.net.URL url) throws java.net.MalformedURLException, java.io.IOException; - public long create(java.net.URL url, long maxsize) throws java.net.MalformedURLException, java.io.IOException; - public FileContents get(java.net.URL url) throws java.net.MalformedURLException, java.io.IOException, java.io.FileNotFoundException; - public void delete(java.net.URL url) throws java.net.MalformedURLException, java.io.IOException; - public java.lang.String[] getNames(java.net.URL url) throws java.net.MalformedURLException, java.io.IOException; - public int getTag(java.net.URL url) throws java.net.MalformedURLException, java.io.IOException; - public void setTag(java.net.URL url, int tag) throws java.net.MalformedURLException, java.io.IOException; + public void setTag(java.net.URL url, int tag) throws java.net.MalformedURLException, java.io.IOException; } diff --git a/netx/javax/jnlp/PrintService.java b/netx/javax/jnlp/PrintService.java index 7573233..ffd7444 100644 --- a/netx/javax/jnlp/PrintService.java +++ b/netx/javax/jnlp/PrintService.java @@ -1,12 +1,13 @@ - - package javax.jnlp; public interface PrintService { - public java.awt.print.PageFormat getDefaultPage(); - public java.awt.print.PageFormat showPageFormatDialog(java.awt.print.PageFormat page); - public boolean print(java.awt.print.Pageable document); - public boolean print(java.awt.print.Printable painter); + public java.awt.print.PageFormat getDefaultPage(); + + public java.awt.print.PageFormat showPageFormatDialog(java.awt.print.PageFormat page); + + public boolean print(java.awt.print.Pageable document); + + public boolean print(java.awt.print.Printable painter); } diff --git a/netx/javax/jnlp/ServiceManager.java b/netx/javax/jnlp/ServiceManager.java index 7e6fb36..2f35a6f 100644 --- a/netx/javax/jnlp/ServiceManager.java +++ b/netx/javax/jnlp/ServiceManager.java @@ -1,54 +1,48 @@ - - - package javax.jnlp; import java.util.*; - public final class ServiceManager { - private static ServiceManagerStub stub = null; + private static ServiceManagerStub stub = null; - private static Map<String,Object> lookupTable - = new HashMap<String,Object>(); // ensure lookup is idempotent - - private ServiceManager() { - // says it can't be instantiated - } + private static Map<String, Object> lookupTable = new HashMap<String, Object>(); // ensure lookup is idempotent + private ServiceManager() { + // says it can't be instantiated + } - public static java.lang.Object lookup(java.lang.String name) throws UnavailableServiceException { - if (stub == null) - throw new UnavailableServiceException("service stub not set."); + public static java.lang.Object lookup(java.lang.String name) throws UnavailableServiceException { + if (stub == null) + throw new UnavailableServiceException("service stub not set."); - synchronized(lookupTable) { - Object result = lookupTable.get(name); + synchronized (lookupTable) { + Object result = lookupTable.get(name); - if (result == null) { - result = stub.lookup(name); - if (result != null) - lookupTable.put(name, result); - } + if (result == null) { + result = stub.lookup(name); + if (result != null) + lookupTable.put(name, result); + } - if (result == null) - throw new UnavailableServiceException("service not available (stub returned null)."); + if (result == null) + throw new UnavailableServiceException("service not available (stub returned null)."); - return result; + return result; + } } - } - public static java.lang.String[] getServiceNames() { - // should this return the required ones even though no stub?? - if (stub == null) - return new String[0]; + public static java.lang.String[] getServiceNames() { + // should this return the required ones even though no stub?? + if (stub == null) + return new String[0]; - return stub.getServiceNames(); - } + return stub.getServiceNames(); + } - public static void setServiceManagerStub(ServiceManagerStub stub) { - if (ServiceManager.stub == null) - ServiceManager.stub = stub; - } + public static void setServiceManagerStub(ServiceManagerStub stub) { + if (ServiceManager.stub == null) + ServiceManager.stub = stub; + } } diff --git a/netx/javax/jnlp/ServiceManagerStub.java b/netx/javax/jnlp/ServiceManagerStub.java index 04af1dd..5afe2e3 100644 --- a/netx/javax/jnlp/ServiceManagerStub.java +++ b/netx/javax/jnlp/ServiceManagerStub.java @@ -1,10 +1,9 @@ - - package javax.jnlp; public interface ServiceManagerStub { - public java.lang.Object lookup(java.lang.String name) throws UnavailableServiceException; - public java.lang.String[] getServiceNames(); + public java.lang.Object lookup(java.lang.String name) throws UnavailableServiceException; + + public java.lang.String[] getServiceNames(); } diff --git a/netx/javax/jnlp/UnavailableServiceException.java b/netx/javax/jnlp/UnavailableServiceException.java index b5c342d..b1ef4e6 100644 --- a/netx/javax/jnlp/UnavailableServiceException.java +++ b/netx/javax/jnlp/UnavailableServiceException.java @@ -1,15 +1,13 @@ - - package javax.jnlp; public class UnavailableServiceException extends Exception { - public UnavailableServiceException() { - super(); - } + public UnavailableServiceException() { + super(); + } - public UnavailableServiceException(java.lang.String message) { - super(message); - } + public UnavailableServiceException(java.lang.String message) { + super(message); + } } |