Class UssWrite


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

    z/OSMF REST API

    Version:
    4.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,
                        ZosmfRequest 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 ZosmfRequestException
        Perform UNIX write text content request
        Parameters:
        fileNamePath - file name with a path
        content - string content to write to file
        Returns:
        Response object
        Throws:
        ZosmfRequestException - request error state
      • writeBinary

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

        public Response writeCommon​(String fileNamePath,
                                    WriteParams params)
                             throws ZosmfRequestException
        Perform UNIX write request driven by WriteParams settings
        Parameters:
        fileNamePath - file name with a path
        params - parameters within a WriteParams object that drives the write action request
        Returns:
        Response object
        Throws:
        ZosmfRequestException - request error state