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

## de.jstacs.parameters
Class FileParameter.FileRepresentation

    java.lang.Object
      de.jstacs.parameters.FileParameter.FileRepresentation

All Implemented Interfaces:
  Storable, Cloneable

Enclosing class:
  FileParameter

    public static class FileParameter.FileRepresentation

extends Object
implements Storable, Cloneable

Class that represents a file.

Author:
  Jan Grau

Constructor Summary
`FileParameter.FileRepresentation(String filename)` Creates a new `FileParameter.FileRepresentation` from a filename.
`FileParameter.FileRepresentation(StringBuffer buf)` The standard constructor for the interface `Storable` .
`FileParameter.FileRepresentation(String filename, String content)` Creates a `FileParameter.FileRepresentation` out of the filename and the file's contents.

Method Summary
`FileParameter.FileRepresentation` | `clone()`
`String` | `getContent()` Returns the content of the file.
`String` | `getFilename()` Returns the filename.
`StringBuffer` | `toXML()` This method returns an XML representation as `StringBuffer` of an instance of the implementing class.

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

Constructor Detail

### FileParameter.FileRepresentation

    public FileParameter.FileRepresentation(String filename,
                                            String content)

  Creates a `FileParameter.FileRepresentation` out of the filename and the file's contents.

  Parameters:
    `filename` - the name of the file
    `content` - the contents of the file

### FileParameter.FileRepresentation

    public FileParameter.FileRepresentation(String filename)

  Creates a new `FileParameter.FileRepresentation` from a filename.

  Parameters:
    `filename` - the filename

### FileParameter.FileRepresentation

    public FileParameter.FileRepresentation(StringBuffer buf)
                                     throws NonParsableException

  The standard constructor for the interface `Storable` . Restores the `FileParameter.FileRepresentation` from an XML representation.

  Parameters:
    `buf` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the `StringBuffer` could not be parsed
  See Also:
    `fromXML(StringBuffer)`

Method Detail

### clone

    public FileParameter.FileRepresentation clone()
                                           throws CloneNotSupportedException

  Overrides:
    `clone` in class `Object`
  Throws:
    `CloneNotSupportedException`

### getFilename

    public String getFilename()

  Returns the filename.

  Returns:
    the name of the file

### getContent

    public String getContent()

  Returns the content of the file.

  Returns:
    the content of the file

### toXML

    public StringBuffer toXML()

  Description copied from interface: `Storable`
  This method returns an XML representation as `StringBuffer` of an instance of the implementing class.

  Specified by:
    `toXML` in interface `Storable`
  Returns:
    the XML representation

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