com.microfocus.awm.core

## Class SimpleGetdataResponse

- java.lang.Object
- - com.microfocus.awm.core.SimpleGetdataResponse

- All Implemented Interfaces:
    IGetDataResponse

      public class SimpleGetdataResponse
      extends java.lang.Object
      implements IGetDataResponse

  `IGetDataResponse` implementation which contains an input stream, a settable write protection flag and local code page.
  Author:
    Ralf Pakosch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleGetdataResponse(java.io.InputStream pIs, boolean pWriteProtected)` Basic constructor.
    `SimpleGetdataResponse(java.io.InputStream pIs, boolean pWriteProtected, java.lang.String pLocalCP)` Basic constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.InputStream` | `getInputStream()`
    `java.lang.String` | `getLocalCodePage()`
    `boolean` | `isWriteProtected()` Returns whether the response restricts the re-upload of the contents.

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

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

- - ### Constructor Detail

    - #### SimpleGetdataResponse

          public SimpleGetdataResponse(java.io.InputStream pIs,
                                       boolean pWriteProtected)

      Basic constructor.
      Parameters:
        `pIs` - the input stream
        `pWriteProtected` - write protection flag

    - #### SimpleGetdataResponse

          public SimpleGetdataResponse(java.io.InputStream pIs,
                                       boolean pWriteProtected,
                                       java.lang.String pLocalCP)

      Basic constructor.
      Parameters:
        `pIs` - the input stream
        `pWriteProtected` - write protection flag
        `pLocalCP` - the local code page used to create the contents (Needed to set the charset of workspace file in case of setting this contents in a workspace file).

  - ### Method Detail

    - #### isWriteProtected

          public boolean isWriteProtected()

      Description copied from interface: `IGetDataResponse`
      Returns whether the response restricts the re-upload of the contents. This happens if the returned data was mutated or was not intended to be changed.
      Specified by:
        `isWriteProtected` in interface `IGetDataResponse`
      Returns:
        `true` if the received data is write protected and `false` otherwise.

    - #### getInputStream

          public java.io.InputStream getInputStream()
                                             throws java.io.IOException

      Specified by:
        `getInputStream` in interface `IGetDataResponse`
      Returns:
        the InputStream usually containing the requested data
      Throws:
        `java.io.IOException` - if an error occurs during the creation of the input stream

    - #### getLocalCodePage

          public java.lang.String getLocalCodePage()

      Specified by:
        `getLocalCodePage` in interface `IGetDataResponse`
      Returns:
        return the local code page that should be used to store the contents in a file. Can be `null`

Copyright © 2015 Micro Focus GmbH. All rights reserved.