Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.services.files
Interface IFileServiceCodePageConverter

All Known Implementing Classes:
DefaultFileServiceCodePageConverter

public interface IFileServiceCodePageConverter

This interface is used by the extension point It allows overriding the Universal File Subsystem translation of files, and results in binary transfer, with calls to the implementor to handle code page conversion.

Since:
org.eclipse.rse.services 3.0

Method Summary
 byte[] convertClientStringToRemoteBytes ( String remotePath, String clientString, String remoteEncoding, IFileService fs)
          Converts a client string to remote bytes, for use when uploading in binary mode.
 void convertFileFromRemoteEncoding ( String remotePath, File file, String remoteEncoding, String localEncoding, IFileService fs)
          Converts the specified file (which was downloaded from the server in binary mode) from server encoding bytes, to local encoding
 int getPriority ( String remoteEncoding, IFileService fs)
          Indicates the priority of this code page converter if more than one code page converter handle a particular encoding.
 boolean isServerEncodingSupported ( String remoteEncoding, IFileService fs)
          Indicates whether or not the specified server encoding and subsystem implementation is supported by this code page converter
 

Method Detail

convertClientStringToRemoteBytes

byte[] convertClientStringToRemoteBytes(
String remotePath,
                                        
String clientString,
                                        
String remoteEncoding,
                                        
IFileService fs)
Converts a client string to remote bytes, for use when uploading in binary mode.

Parameters:
remotePath - the path of the remote file
clientString - the client string to convert
remoteEncoding - The remote encoding for the desired server bytes
fs - The file service to apply conversion to. Can be used to determine implementation specific settings to the converter
Returns:
The bytes to upload to the server

convertFileFromRemoteEncoding

void convertFileFromRemoteEncoding(
String remotePath,
                                   
File file,
                                   
String remoteEncoding,
                                   
String localEncoding,
                                   
IFileService fs)
Converts the specified file (which was downloaded from the server in binary mode) from server encoding bytes, to local encoding

Parameters:
remotePath - the path of the remote file
file - The file to convert
localEncoding - The remote encoding of the file
fs - The file service to apply conversion to. Can be used to determine implementation specific settings to the converter
Throws:
RuntimeException - (wrapping a CharacterCodingException or IOException) in case of an error transposing from source to target encoding

isServerEncodingSupported

boolean isServerEncodingSupported(
String remoteEncoding,
                                  
IFileService fs)
Indicates whether or not the specified server encoding and subsystem implementation is supported by this code page converter

Parameters:
remoteEncoding - The remote encoding from the server to check
fs - The file service to apply conversion to. Can be used to determine implementation specific settings to the converter
Returns:
True if this code page converter can convert the specified encoding, false otherwise

getPriority

int getPriority(
String remoteEncoding,
                
IFileService fs)
Indicates the priority of this code page converter if more than one code page converter handle a particular encoding. The lower the number, the higher the priority.

Returns:
priority

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire