@Override
 public com.bradmcevoy.http.Resource createNew(
     String newName, InputStream inputStream, Long length, String contentType)
     throws IOException, ConflictException, NotAuthorizedException, BadRequestException {
   try {
     File newFile = folder.upload(newName, inputStream, length, null);
     return new FileResourceAdapter(newFile, getSecurityManager(), getHostName(), remoteManager);
   } catch (HttpException ex) {
     throw new RuntimeException(ex);
   } catch (NotFoundException ex) {
     throw new RuntimeException(ex);
   }
 }