Class UssWrite


  • public class UssWrite
    extends Object
    Provides Unix System Services (USS) write to object functionality

    z/OSMF REST API

    Version:
    2.0
    Author:
    James Kostrewski, Frank Giordano
    • Constructor Detail

      • UssWrite

        public UssWrite​(ZosConnection connection)
        UssWrite Constructor
        Parameters:
        connection - connection information, see ZosConnection object
      • UssWrite

        public UssWrite​(ZosConnection connection,
                        ZoweRequest request)
        Alternative UssWrite constructor with ZoweRequest object. This is mainly used for internal code unit testing with mockito, and it is not recommended to be used by the larger community.
        Parameters:
        connection - connection information, see ZosConnection object
        request - any compatible ZoweRequest Interface object
    • Method Detail

      • writeText

        public Response writeText​(String fileNamePath,
                                  String content)
                           throws Exception
        Perform write text content request
        Parameters:
        fileNamePath - file name with path
        content - string content to write to file
        Returns:
        Response object
        Throws:
        Exception - processing error
      • writeBinary

        public Response writeBinary​(String fileNamePath,
                                    byte[] content)
                             throws Exception
        Perform write binary content request
        Parameters:
        fileNamePath - file name with path
        content - binary content to write to file
        Returns:
        Response object
        Throws:
        Exception - processing error
      • writeCommon

        public Response writeCommon​(String fileNamePath,
                                    WriteParams params)
                             throws Exception
        Perform write request driven by WriteParams settings
        Parameters:
        fileNamePath - file name with path
        params - WriteParams parameters that specifies write action request
        Returns:
        Response object
        Throws:
        Exception - processing error