Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.cult3d.world
Class Resource

    java.lang.Object
      |
      +--com.cult3d.world.Resource

public class Resource
extends java.lang.Object

This class provides a way to extract resources from a Cult3D object. A resource is any kind of data that can be represented with an byte array.

Since:
  Cult3D 4.0

Constructor Summary
`Resource(java.lang.String name)` Constructs a Java representation of a Cult3D resource.

Method Summary
`java.lang.String` | `getInfo()` Returns a string representation of the values of this object.
`java.lang.String` | `getName()` Gets the name of this resource.
`byte[]` | `getResource()` Extracts the resource in the form of a byte array.
`java.lang.String` | `toString()` This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Resource

    public Resource(java.lang.String name)

  Constructs a Java representation of a Cult3D resource.
  Parameters:
    `name` - the name of the resource.
  Throws:
    NameNotFoundException - for invalid name.
  Since:
    Cult3D 4.0

Method Detail

### getResource

    public byte[] getResource()

  Extracts the resource in the form of a byte array.
  Returns:
    an array of bytes containing the resource.
  Since:
    Cult3D 4.0

### getName

    public java.lang.String getName()

  Gets the name of this resource. If the resource could not be found, this method will return null.
  Returns:
    The name of this resource, see method description for details.
  Since:
    Cult3D 5.3

### getInfo

    public java.lang.String getInfo()

  Returns a string representation of the values of this object.

  This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

  Returns:
    A string representing this object.
  Since:
    Cult3D 5.3

### toString

    public java.lang.String toString()

  This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

  Overrides:
    toString in class java.lang.Object
  Returns:
    A string representing this object.

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD