code: static DeploymentContent of(final InputStream content) {
          final ByteArrayInputStream copiedContent = copy(content);
          return new DeploymentContent() {
              @Override
              void addContentToOperation(final OperationBuilder builder, final ModelNode op) {
                  copiedContent.reset();
                  final ModelNode contentNode = op.get(CONTENT);
                  final ModelNode contentItem = contentNode.get(0);
                  // The index is 0 based so use the input stream count before adding the input stream
                  contentItem.get(ClientConstants.INPUT_STREAM_INDEX).set(builder.getInputStreamCount());
                  builder.addInputStream(copiedContent);
              }
  
              @Override
              public String toString() {
                  return String.format("%s(%s)", DeploymentContent.class.getName(), copiedContent);
              }
          };
      }
docs: Creates new deployment content based on the stream content. The stream content is copied, stored in-memory and
  closed.
  
  @param content the content to deploy
  
  @return the deployment content