edu.csus.ecs.pc2.api

## Class PC2APIFile

- java.lang.Object
- - edu.csus.ecs.pc2.api.PC2APIFile

- All Implemented Interfaces:
    edu.csus.ecs.pc2.core.model.IFile

      public class PC2APIFile
      extends Object
      implements edu.csus.ecs.pc2.core.model.IFile

  This class is a concrete implementation of a file from the point of view of the PC2 API.
  Author:
    John Clevenger, PC2 Development Team (pc2@ecs.csus.edu)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PC2APIFile(String name, String base64Data)` Constructs a PC2APIFile object with the specified name and containing data bytes defined by decoding the specified base64 String.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAbsolutePath()` Returns a String containing the absolute path for the name of this IFile object.
    `String` | `getBase64Data()` Returns a String containing the Base64-encoded data in this IFile object.
    `byte[]` | `getByteData()` Returns a byte array containing the data in this IFile object.
    `String` | `getFileName()` Returns a String containing the name of this IFile object.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PC2APIFile

          public PC2APIFile(String name,
                            String base64Data)

      Constructs a PC2APIFile object with the specified name and containing data bytes defined by decoding the specified base64 String.
      Parameters:
        `name` - -- the name of the file
        `base64Data` - -- a Base64-encoded String containing the file data

  - ### Method Detail

    - #### getFileName

          public String getFileName()

      Returns a String containing the name of this IFile object.
      Specified by:
        `getFileName` in interface `edu.csus.ecs.pc2.core.model.IFile`
      Returns:
        a String containing the file name

    - #### getBase64Data

          public String getBase64Data()

      Returns a String containing the Base64-encoded data in this IFile object.
      Specified by:
        `getBase64Data` in interface `edu.csus.ecs.pc2.core.model.IFile`
      Returns:
        a Base64-encoded String

    - #### getByteData

          public byte[] getByteData()

      Returns a byte array containing the data in this IFile object.
      Specified by:
        `getByteData` in interface `edu.csus.ecs.pc2.core.model.IFile`
      Returns:
        a byte array

    - #### getAbsolutePath

          public String getAbsolutePath()

      Description copied from interface: `edu.csus.ecs.pc2.core.model.IFile`
      Returns a String containing the absolute path for the name of this IFile object.
      Specified by:
        `getAbsolutePath` in interface `edu.csus.ecs.pc2.core.model.IFile`
      Returns:
        a String containing the absolute path to the filename