net.sf.jfilesync.plugins.net
Class EncodingProxy

java.lang.Object
  extended by net.sf.jfilesync.plugins.net.EncodingProxy
All Implemented Interfaces:
AbstractConnectionProxy

public class EncodingProxy
extends java.lang.Object
implements AbstractConnectionProxy


Field Summary
private  java.lang.String encoding
           
private  java.lang.String hostEncoding
           
private static java.util.logging.Logger LOGGER
           
private  AbstractConnectionProxy proxy
           
 
Constructor Summary
EncodingProxy(AbstractConnectionProxy proxy, java.lang.String encoding)
           
 
Method Summary
 void abort()
           
 void chdir(java.lang.String path)
           
 void connect()
           
protected  TFileData decodeTFileData(TFileData data)
           
 void disconnect()
           
 boolean exists(java.lang.String path)
           
 void get(java.lang.String remoteFileName, java.io.OutputStream outstream)
           
 java.lang.String getCurrentPath()
           
 java.lang.String getEncodedFileName(java.lang.String fileName)
           
 CapivaraFileInputStream getFileInputStream(java.lang.String fileName)
           
 CapivaraFileOutputStream getFileOutputStream(java.lang.String fileName)
           
 TPathControlInterface getPathControlInstance()
           
 ConnectionPlugin getPlugin()
           
 boolean isConnected()
           
 boolean isFile(java.lang.String path)
           
 boolean isLink(java.lang.String path)
           
 boolean isLocalConnection()
           
 TFileData ls()
           
 TFileData ls(java.lang.String path)
           
 void mkdir(java.lang.String dirName)
           
 void mkdirs(java.lang.String dirName)
           
 void put(java.io.InputStream instream, java.lang.String remoteFileName)
           
 java.lang.String pwd()
           
 void remove(java.lang.String fileName)
           
 void rename(java.lang.String oldAbsoluteFileName, java.lang.String newName)
           
 void rmdir(java.lang.String dirName)
           
 void setHidden(java.lang.String path)
           
 void setModificationTime(java.lang.String fileName, long mtime)
           
 void setPermissions(java.lang.String fileName, int permissions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

proxy

private final AbstractConnectionProxy proxy

encoding

private final java.lang.String encoding

hostEncoding

private final java.lang.String hostEncoding

LOGGER

private static final java.util.logging.Logger LOGGER
Constructor Detail

EncodingProxy

public EncodingProxy(AbstractConnectionProxy proxy,
                     java.lang.String encoding)
Method Detail

ls

public TFileData ls()
             throws java.io.IOException
Specified by:
ls in interface AbstractConnectionProxy
Throws:
java.io.IOException

ls

public TFileData ls(java.lang.String path)
             throws java.io.IOException
Specified by:
ls in interface AbstractConnectionProxy
Throws:
java.io.IOException

decodeTFileData

protected TFileData decodeTFileData(TFileData data)
                             throws java.io.IOException
Throws:
java.io.IOException

getEncodedFileName

public java.lang.String getEncodedFileName(java.lang.String fileName)
                                    throws java.io.IOException
Specified by:
getEncodedFileName in interface AbstractConnectionProxy
Throws:
java.io.IOException

chdir

public void chdir(java.lang.String path)
           throws java.io.IOException
Specified by:
chdir in interface AbstractConnectionProxy
Throws:
java.io.IOException

getCurrentPath

public java.lang.String getCurrentPath()
Specified by:
getCurrentPath in interface AbstractConnectionProxy

getFileInputStream

public CapivaraFileInputStream getFileInputStream(java.lang.String fileName)
                                           throws java.io.IOException
Specified by:
getFileInputStream in interface AbstractConnectionProxy
Throws:
java.io.IOException

put

public void put(java.io.InputStream instream,
                java.lang.String remoteFileName)
         throws java.io.IOException
Specified by:
put in interface AbstractConnectionProxy
Throws:
java.io.IOException

getFileOutputStream

public CapivaraFileOutputStream getFileOutputStream(java.lang.String fileName)
                                             throws java.io.IOException
Specified by:
getFileOutputStream in interface AbstractConnectionProxy
Throws:
java.io.IOException

get

public void get(java.lang.String remoteFileName,
                java.io.OutputStream outstream)
         throws java.io.IOException
Specified by:
get in interface AbstractConnectionProxy
Throws:
java.io.IOException

mkdir

public void mkdir(java.lang.String dirName)
           throws java.io.IOException
Specified by:
mkdir in interface AbstractConnectionProxy
Throws:
java.io.IOException

mkdirs

public void mkdirs(java.lang.String dirName)
            throws java.io.IOException
Specified by:
mkdirs in interface AbstractConnectionProxy
Throws:
java.io.IOException

remove

public void remove(java.lang.String fileName)
            throws java.io.IOException
Specified by:
remove in interface AbstractConnectionProxy
Throws:
java.io.IOException

rmdir

public void rmdir(java.lang.String dirName)
           throws java.io.IOException
Specified by:
rmdir in interface AbstractConnectionProxy
Throws:
java.io.IOException

abort

public void abort()
           throws java.io.IOException
Specified by:
abort in interface AbstractConnectionProxy
Throws:
java.io.IOException

pwd

public java.lang.String pwd()
Specified by:
pwd in interface AbstractConnectionProxy

rename

public void rename(java.lang.String oldAbsoluteFileName,
                   java.lang.String newName)
            throws java.io.IOException
Specified by:
rename in interface AbstractConnectionProxy
Throws:
java.io.IOException

setModificationTime

public void setModificationTime(java.lang.String fileName,
                                long mtime)
                         throws java.io.IOException
Specified by:
setModificationTime in interface AbstractConnectionProxy
Throws:
java.io.IOException

setPermissions

public void setPermissions(java.lang.String fileName,
                           int permissions)
                    throws java.io.IOException
Specified by:
setPermissions in interface AbstractConnectionProxy
Throws:
java.io.IOException

exists

public boolean exists(java.lang.String path)
Specified by:
exists in interface AbstractConnectionProxy

isLink

public boolean isLink(java.lang.String path)
               throws java.io.IOException
Specified by:
isLink in interface AbstractConnectionProxy
Throws:
java.io.IOException

isFile

public boolean isFile(java.lang.String path)
               throws java.io.IOException
Specified by:
isFile in interface AbstractConnectionProxy
Throws:
java.io.IOException

connect

public void connect()
             throws PluginConnectException
Specified by:
connect in interface AbstractConnectionProxy
Throws:
PluginConnectException

disconnect

public void disconnect()
Specified by:
disconnect in interface AbstractConnectionProxy

isConnected

public boolean isConnected()
Specified by:
isConnected in interface AbstractConnectionProxy

isLocalConnection

public boolean isLocalConnection()
Specified by:
isLocalConnection in interface AbstractConnectionProxy

getPlugin

public ConnectionPlugin getPlugin()
Specified by:
getPlugin in interface AbstractConnectionProxy

getPathControlInstance

public TPathControlInterface getPathControlInstance()
Specified by:
getPathControlInstance in interface AbstractConnectionProxy

setHidden

public void setHidden(java.lang.String path)
               throws java.io.IOException
Specified by:
setHidden in interface AbstractConnectionProxy
Throws:
java.io.IOException