code: public static SwiftOutputStream put(Access access, String objectName) throws IOException {
      LOG.debug("PUT method, object : {}", objectName);
      URL url = new URL(access.getPublicURL() + "/" + objectName);
      URLConnection connection = url.openConnection();
      if (!(connection instanceof HttpURLConnection)) {
        throw new IOException("Connection is not an instance of HTTP URL Connection");
      }
  
      HttpURLConnection httpCon = (HttpURLConnection) connection;
      httpCon.setRequestMethod("PUT");
      httpCon.addRequestProperty("X-Auth-Token", access.getToken());
      httpCon.addRequestProperty("Content-Type", "binary/octet-stream");
      httpCon.setDoInput(true);
      httpCon.setRequestProperty("Connection", "close");
      httpCon.setReadTimeout(HTTP_READ_TIMEOUT);
      httpCon.setRequestProperty("Transfer-Encoding", "chunked");
      httpCon.setDoOutput(true);
      httpCon.setChunkedStreamingMode(HTTP_CHUNK_STREAMING);
      httpCon.connect();
      return new SwiftOutputStream(httpCon);
    }
docs: Swift HTTP PUT request.
  
  @param access JOSS access object
  @param objectName name of the object to create
  @return SwiftOutputStream that will be used to upload data to Swift