dsto.dfc.swing.net.content.application
Class x_java_object

java.lang.Object
  extended by java.net.ContentHandler
      extended by dsto.dfc.swing.net.content.application.x_java_object

public class x_java_object
extends ContentHandler

URL content handler for application/x-java-object content ie XML serialized objects. Call register() to enable this as a system-wide content handler.

Version:
$Revision$

Field Summary
static String IOBJECT_MIME_TYPE
           
 
Constructor Summary
x_java_object()
           
 
Method Summary
 Object getContent(URLConnection connection)
          Use (@link dsto.dfc.persistence.Deserializer} to return an Object as the URL content.
static Object getObjectFromURL(URLConnection connection)
          Use Deserializer to return an Object as the URL content.
static void register()
          Enable this class as the system-wide content handler for application/x-java-object content.
static void registerExtension(String extention)
          Add another extention to be a content handler for.
 
Methods inherited from class java.net.ContentHandler
getContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IOBJECT_MIME_TYPE

public static String IOBJECT_MIME_TYPE
Constructor Detail

x_java_object

public x_java_object()
Method Detail

registerExtension

public static void registerExtension(String extention)
Add another extention to be a content handler for.


register

public static void register()
Enable this class as the system-wide content handler for application/x-java-object content.


getContent

public Object getContent(URLConnection connection)
                  throws IOException
Use (@link dsto.dfc.persistence.Deserializer} to return an Object as the URL content.

Specified by:
getContent in class ContentHandler
Throws:
IOException

getObjectFromURL

public static Object getObjectFromURL(URLConnection connection)
                               throws IOException
Use Deserializer to return an Object as the URL content. This is static so that programs do not have to register as a URL Handler to get the Object. We do this because some programs are not allowed to register themselves as URLHandlers. ie Applets.

Throws:
IOException


Copyright © 2008 Commonwealth of Australia