loader
Class ResourcePacket

java.lang.Object
  |
  +--loader.ResourcePacket
Direct Known Subclasses:
ClassPacket

public class ResourcePacket
extends java.lang.Object
implements java.io.Serializable

It is used to sent the class byte array to the requester.

It could also store some further information.

Version:
1.2 August 2000
Author:
Lorenzo Bettini - bettini@dsi.unifi.it, Donato Cappetta - cappetta@infomedia.it
See Also:
Serialized Form

Constructor Summary
ResourcePacket(byte[] bytes)
          Costructor for the byte array
ResourcePacket(java.lang.String error)
          Costructor for errors
 
Method Summary
 java.lang.String getError()
          return the string for the error
 byte[] getResourceBytes()
          return the byte array
 boolean isOK()
          if no error happened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcePacket

public ResourcePacket(java.lang.String error)
Costructor for errors
Parameters:
error - the error that was found on the server

ResourcePacket

public ResourcePacket(byte[] bytes)
Costructor for the byte array
Parameters:
bytes - the byte array for the requested class
Method Detail

isOK

public boolean isOK()
if no error happened

getError

public java.lang.String getError()
return the string for the error

getResourceBytes

public byte[] getResourceBytes()
return the byte array