Tabnine Logo
com.microsoft.azure.storage.file
Code IndexAdd Tabnine to your IDE (free)

How to use com.microsoft.azure.storage.file

Best Java code snippets using com.microsoft.azure.storage.file (Showing top 20 results out of 315)

origin: Microsoft/spring-cloud-azure

  private void create() throws StorageException, URISyntaxException {
    this.fileShare.createIfNotExists();
    //TODO: create method must provide file length, but we don't know actual
    //file size when creating. Pending on github issue feedback.
    this.cloudFile.create(1024);
  }
}
origin: com.microsoft.azure/azure-storage

@Override
public void setHeaders(HttpURLConnection connection, CloudFileDirectory directory, OperationContext context) {
  FileRequest.addMetadata(connection, directory.getMetadata(), context);
}
origin: com.microsoft.azure/azure-storage

  @Override
  public String preProcessResponse(CloudFile file, CloudFileClient client, OperationContext context)
      throws Exception {
    if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_ACCEPTED) {
      this.setNonExceptionedRetryableFailure(true);
      return null;
    }
    file.updateEtagAndLastModifiedFromResponse(this.getConnection());
    file.properties.setCopyState(FileResponse.getCopyState(this.getConnection()));
    return file.properties.getCopyState().getCopyId();
  }
};
origin: Azure/azure-storage-android

  public static void setFileProperties(CloudFile file) {
    file.getProperties().setCacheControl("no-transform");
    file.getProperties().setContentDisposition("attachment");
    file.getProperties().setContentEncoding("gzip");
    file.getProperties().setContentLanguage("tr,en");
    file.getProperties().setContentMD5("MDAwMDAwMDA=");
    file.getProperties().setContentType("text/html");
  }
}
origin: Azure/azure-storage-android

@Before
public void fileEncryptionTestMethodSetup() throws URISyntaxException, StorageException, IOException {
  this.share = FileTestHelper.getRandomShareReference();
  this.share.create();
  this.dir = this.share.getRootDirectoryReference().getDirectoryReference("dir");
  this.dir.create();
  this.file = this.share.getRootDirectoryReference().getFileReference("file");
  this.file.uploadText("text");
}
origin: Azure/azure-storage-android

public static CloudFile defiddler(CloudFile file) throws URISyntaxException, StorageException {
  URI oldUri = file.getUri();
  URI newUri = defiddler(oldUri);
  if (newUri != oldUri) {
    CloudFile newFile = new CloudFile(newUri, file.getServiceClient().getCredentials());
    return newFile;
  }
  else {
    return file;
  }
}

origin: Azure/azure-storage-android

public static CloudFile uploadNewFile(
    CloudFileShare share, InputStream stream, int length, OperationContext context)
    throws StorageException, IOException, URISyntaxException {
  String name = generateRandomFileName();
  CloudFile file = null;
  file = share.getRootDirectoryReference().getFileReference(name);
  file.upload(stream, length, null, null, context);
  return file;
}
origin: com.microsoft.azure/azure-storage

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFile file, OperationContext context)
    throws Exception {
  return FileRequest.getFileProperties(
      file.getTransformedAddress(context).getUri(this.getCurrentLocation()),
      options, context, accessCondition, file.getShare().snapshotID);
}
origin: com.microsoft.azure/azure-storage

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFile file, OperationContext context)
    throws Exception {
  return FileRequest.getFileRanges(file.getTransformedAddress(context).getUri(this.getCurrentLocation()),
      options, context, accessCondition, file.getShare().snapshotID);
}
origin: Azure/azure-storage-android

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFile file, OperationContext context)
    throws Exception {
  return FileRequest.getFileProperties(
      file.getTransformedAddress(context).getUri(this.getCurrentLocation()),
      options, context, accessCondition, file.getShare().snapshotID);
}
origin: com.microsoft.azure/azure-storage

@Override
public ArrayList<FileRange> postProcessResponse(HttpURLConnection connection, CloudFile file,
    CloudFileClient client, OperationContext context, ArrayList<FileRange> storageObject)
    throws Exception {
  file.updateEtagAndLastModifiedFromResponse(this.getConnection());
  file.updateLengthFromResponse(this.getConnection());
  return FileRangeHandler.getFileRanges(this.getConnection().getInputStream());
}
origin: com.microsoft.azure/azure-storage

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFileDirectory directory,
    OperationContext context) throws Exception {
  return FileRequest.getDirectoryProperties(
      directory.getTransformedAddress().getUri(this.getCurrentLocation()), options, context,
      accessCondition, directory.getShare().snapshotID);
}
 
origin: com.microsoft.azure/azure-storage

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFileDirectory directory,
    OperationContext context) throws Exception {
  return FileRequest.getDirectoryProperties(
      directory.getTransformedAddress().getUri(this.getCurrentLocation()), options, context,
      accessCondition, directory.getShare().snapshotID);
}
origin: com.microsoft.azure/azure-storage

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFile file, OperationContext context)
    throws Exception {
  return FileRequest.abortCopy(file.getTransformedAddress(context).getUri(this.getCurrentLocation()),
      options, context, accessCondition, copyId);
}
origin: com.microsoft.azure/azure-storage

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFile file, OperationContext context)
    throws Exception {
  return FileRequest.putFile(file.getTransformedAddress(context).getUri(this.getCurrentLocation()),
      options, context, accessCondition, file.properties, size);
}
origin: com.microsoft.azure/azure-storage

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFile file, OperationContext context)
    throws Exception {
  return FileRequest.setFileProperties(
      file.getTransformedAddress(context).getUri(this.getCurrentLocation()),
      options, context, accessCondition, file.properties);
}
origin: com.microsoft.azure/azure-storage

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFile file, OperationContext context)
    throws Exception {
  return FileRequest.deleteFile(file.getTransformedAddress(context).getUri(this.getCurrentLocation()),
      options, context, accessCondition);
}
origin: com.microsoft.azure/azure-storage

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFile file, OperationContext context)
    throws Exception {
  return FileRequest.setFileMetadata(
      file.getTransformedAddress(context).getUri(this.getCurrentLocation()),
      options, context, accessCondition);
}
origin: Azure/azure-storage-android

  @Override
  public String preProcessResponse(CloudFile file, CloudFileClient client, OperationContext context)
      throws Exception {
    if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_ACCEPTED) {
      this.setNonExceptionedRetryableFailure(true);
      return null;
    }
    file.updateEtagAndLastModifiedFromResponse(this.getConnection());
    file.properties.setCopyState(FileResponse.getCopyState(this.getConnection()));
    return file.properties.getCopyState().getCopyId();
  }
};
origin: Azure/azure-storage-android

@Override
public HttpURLConnection buildRequest(CloudFileClient client, CloudFile file, OperationContext context)
    throws Exception {
  return FileRequest.getFileProperties(
      file.getTransformedAddress(context).getUri(this.getCurrentLocation()),
      options, context, accessCondition, file.getShare().snapshotID);
}
com.microsoft.azure.storage.file

Most used classes

  • CloudFileClient
    Provides a client for accessing the Microsoft Azure File service. This class provides a point of acc
  • CloudFileShare
    Represents a share in the Microsoft Azure File service. Shares hold directories, which are encapsula
  • CloudFile
    Represents a Microsoft Azure File.
  • CloudFileDirectory
    Represents a virtual directory of files. Directories, which are encapsulated as CloudFileDirectory o
  • FileProperties
    Represents the system properties for a file.
  • FileDirectoryProperties,
  • FileInputStream,
  • FileOutputStream,
  • FileRange,
  • FileRequest,
  • FileRequestOptions,
  • FileServiceProperties,
  • FileSharePermissions,
  • FileShareProperties,
  • ShareStats,
  • CloudFile$10,
  • CloudFile$11,
  • CloudFile$12,
  • CloudFile$1
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now