goldengate.common.file.passthrough
Interface PassthroughFile


public interface PassthroughFile

This interface is for Object used in Passthrough mode.

Author:
Frederic Bregier

Method Summary
 boolean canRead()
           
 boolean canWrite()
           
 boolean changeDirectory(String path)
           
 void close()
           
 boolean delete()
           
 boolean exists()
           
 String fileFull(boolean lsFormat)
           
 void flush()
           
 long getCRC()
           
 long getFreeSpace()
           
 byte[] getMD5()
           
 String getModificationTime()
          Return the Modification time
 byte[] getSHA1()
           
 boolean isDirectory()
           
 boolean isFile()
           
 boolean isInReading()
           
 boolean isInWriting()
           
 long length()
           
 List<String> list()
           
 List<String> listFull(boolean lsFormat)
           
 boolean mkdir()
           
 void position(long position)
           
 org.jboss.netty.buffer.ChannelBuffer read(int sizeblock)
           
 boolean renameTo(String path)
           
 boolean rmdir()
           
 long transferTo(FileChannel out)
          Note: be aware to not directly use transferTo or transferFrom at once but to use them by chunk to prevent memory usage (mmap used under the wood by the JVM)
 List<String> wildcard(String subPath)
           
 int write(org.jboss.netty.buffer.ChannelBuffer buffer)
           
 

Method Detail

isDirectory

boolean isDirectory()

isFile

boolean isFile()

read

org.jboss.netty.buffer.ChannelBuffer read(int sizeblock)
                                          throws PassthroughException
Throws:
PassthroughException

write

int write(org.jboss.netty.buffer.ChannelBuffer buffer)
          throws PassthroughException
Throws:
PassthroughException

length

long length()

canRead

boolean canRead()

canWrite

boolean canWrite()

isInReading

boolean isInReading()

isInWriting

boolean isInWriting()

exists

boolean exists()

delete

boolean delete()
               throws PassthroughException
Throws:
PassthroughException

renameTo

boolean renameTo(String path)
                 throws PassthroughException
Throws:
PassthroughException

position

void position(long position)
              throws PassthroughException
Throws:
PassthroughException

flush

void flush()
           throws PassthroughException
Throws:
PassthroughException

transferTo

long transferTo(FileChannel out)
                throws PassthroughException
Note: be aware to not directly use transferTo or transferFrom at once but to use them by chunk to prevent memory usage (mmap used under the wood by the JVM)

Parameters:
out -
Returns:
the size in bytes transfered
Throws:
PassthroughException

close

void close()
           throws PassthroughException
Throws:
PassthroughException

wildcard

List<String> wildcard(String subPath)
                      throws PassthroughException
Throws:
PassthroughException

mkdir

boolean mkdir()
              throws PassthroughException
Throws:
PassthroughException

rmdir

boolean rmdir()
              throws PassthroughException
Throws:
PassthroughException

changeDirectory

boolean changeDirectory(String path)
                        throws PassthroughException
Throws:
PassthroughException

getModificationTime

String getModificationTime()
                           throws PassthroughException
Return the Modification time

Returns:
the Modification time as a String YYYYMMDDHHMMSS.sss
Throws:
PassthroughException

list

List<String> list()
                  throws PassthroughException
Throws:
PassthroughException

listFull

List<String> listFull(boolean lsFormat)
                      throws PassthroughException
Throws:
PassthroughException

fileFull

String fileFull(boolean lsFormat)
                throws PassthroughException
Throws:
PassthroughException

getFreeSpace

long getFreeSpace()
                  throws PassthroughException
Throws:
PassthroughException

getCRC

long getCRC()
            throws PassthroughException
Throws:
PassthroughException

getMD5

byte[] getMD5()
              throws PassthroughException
Throws:
PassthroughException

getSHA1

byte[] getSHA1()
               throws PassthroughException
Throws:
PassthroughException


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.