[Visual Basic] Public Function FtpDownloadFileToByteArray(ByVal remoteAddress As String) As Byte()
[C#] public byte[] FtpDownloadFileToByteArray(string remoteAddress);
パラメータ
- remoteAddress
- ダウンロード元の URI
戻り値
成功の場合はデータを格納したバイト配列を、失敗の場合は null (Visual Basic では Nothing)を返します。
解説
FTP プロトコルの場合に有効です。
使用例
[Visual Basic.NET] Dim Data As Byte() 'ユーザ名とパスワード ImageKit.File.FtpCredentials = New NetworkCredential("user", "password") 'パッシブモード接続 ImageKit.File.FtpPassive = True 'ファイルのダウンロード Data = ImageKit.File.FtpDownloadFileToByteArray("ftp://www.newtone.co.jp/test/test.jpg") [Visual C#.NET] byte[] Data; //ユーザ名とパスワード ImageKit.File.FtpCredentials = new NetworkCredential("user", "password"); //パッシブモード接続 ImageKit.File.FtpPassive = true; //ファイルのダウンロード Data = ImageKit.File.FtpDownloadFileToByteArray("ftp://www.newtone.co.jp/test/test.jpg");
参照
ImageKit.File メンバ | Newtone.ImageKit.WPF.ImageKit