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

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
Class DefaultFileServiceCodePageConverter

java.lang.Object
  extended by 
org.eclipse.rse.services.files.DefaultFileServiceCodePageConverter
All Implemented Interfaces:
IFileServiceCodePageConverter

public class DefaultFileServiceCodePageConverter
extends Object
implements IFileServiceCodePageConverter

Since:
3.0

Constructor Summary
DefaultFileServiceCodePageConverter ()
           
 
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 remoteEString, IFileService fs)
          to make another converter take precedence over this, supply a code page converter returning a lower number (i.e. higher priority)
 boolean isServerEncodingSupported ( String remoteEncoding, IFileService fs)
          Indicates whether or not the specified server encoding and subsystem implementation is supported by this code page converter
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFileServiceCodePageConverter

public DefaultFileServiceCodePageConverter()
Method Detail

convertClientStringToRemoteBytes

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

Specified by:
convertClientStringToRemoteBytes in interface IFileServiceCodePageConverter
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

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

Specified by:
convertFileFromRemoteEncoding in interface IFileServiceCodePageConverter
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

isServerEncodingSupported

public boolean isServerEncodingSupported(
String remoteEncoding,
                                         
IFileService fs)
Description copied from interface: IFileServiceCodePageConverter
Indicates whether or not the specified server encoding and subsystem implementation is supported by this code page converter

Specified by:
isServerEncodingSupported in interface IFileServiceCodePageConverter
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

public int getPriority(
String remoteEString,
                       
IFileService fs)
to make another converter take precedence over this, supply a code page converter returning a lower number (i.e. higher priority)

Specified by:
getPriority in interface IFileServiceCodePageConverter
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