public class Utils extends Object
Modifier and Type | Method and Description |
---|---|
void |
upload(String filename,
byte[] contents,
IfExists mode)
Uploads the contents of byte array to an Azure Data Lake file.
|
void |
upload(String filename,
InputStream in,
IfExists mode)
Uploads an
InputStream to an Azure Data Lake file. |
void |
upload(String filename,
String localFilename,
IfExists mode)
Uploads the contents of a local file to an Azure Data Lake file.
|
public void upload(String filename, String localFilename, IfExists mode) throws IOException
filename
- path of file to upload tolocalFilename
- path to local filemode
- IfExists
enum
specifying whether to overwite or throw
an exception if the file already existsIOException
- thrown on errorpublic void upload(String filename, InputStream in, IfExists mode) throws IOException
InputStream
to an Azure Data Lake file.filename
- path of file to upload toin
- InputStream
whose contents will be uploadedmode
- IfExists
enum
specifying whether to overwite or throw
an exception if the file already existsIOException
- thrown on errorpublic void upload(String filename, byte[] contents, IfExists mode) throws IOException
filename
- path of file to upload tocontents
- byte array containing the bytes to uploadmode
- IfExists
enum
specifying whether to overwite or throw
an exception if the file already existsIOException
- thrown on errorCopyright © 2019 Microsoft Corporation. All rights reserved.