This method downloads data in a byte array from the remote server specified by a host name, path, and port number.

[Visual Basic] Public Function FtpDownloadFileToByteArray(ByVal remoteHost As String, ByVal remotePath As String, ByVal remotePort As Integer) As Byte()
[C#] public byte[] FtpDownloadFileToByteArray(string remoteHost, string remotePath, int remotePort);

Parameters

remoteHost

DNS style name or IP Address

remotePath

Path on the remote server

remotePort

IP port number

Return Value

Returns True if successful, otherwise returns False

Explanation

The FtpDownloadFileToByteArray method downloads data in a byte array from the remote server specified by a host name, path, and port number.

This method is enabled for FTP protocol.

Example

[Visual Basic.NET]

Dim Data As Byte()
'Username and password
ImageKit.File.FtpCredentials = New NetworkCredential("user", "password")
'Passive mode
ImageKit.File.FtpPassive = True
'Downloads the file to byte array
Data = ImageKit.File.FtpDownloadFileToByteArray("www.newtone.co.jp", "test/test.jpg", 21)

[Visual C#.NET]

byte[] Data;
//Username and password
ImageKit.File.FtpCredentials = new NetworkCredential("user", "password");
//Passive mode
ImageKit.File.FtpPassive = true;
//Downloads the file to byte array
Data = ImageKit.File.FtpDownloadFileToByteArray("www.newtone.co.jp", "test/test.jpg", 21);

See Also

ImageKit.File Members | Newtone.ImageKit.Wpf.ImageKit

 

The ImageKit WPF is created by Newtone Corporation