Package org.eclipse.serializer.afs.types
Class AIoHandler.Abstract<FS,DS,I extends AItem,F extends AFile,D extends ADirectory,R extends AReadableFile,W extends AWritableFile>
- java.lang.Object
-
- org.eclipse.serializer.afs.types.AIoHandler.Abstract<FS,DS,I,F,D,R,W>
-
- All Implemented Interfaces:
AIoHandler,WriteController
- Enclosing interface:
- AIoHandler
public abstract static class AIoHandler.Abstract<FS,DS,I extends AItem,F extends AFile,D extends ADirectory,R extends AReadableFile,W extends AWritableFile> extends Object implements AIoHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.serializer.afs.types.AIoHandler
AIoHandler.Abstract<FS,DS,I extends AItem,F extends AFile,D extends ADirectory,R extends AReadableFile,W extends AWritableFile>
-
Nested classes/interfaces inherited from interface org.eclipse.serializer.afs.types.WriteController
WriteController.Disabled, WriteController.Enabled
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected RcastReadableFile(AReadableFile file)protected WcastWritableFile(AWritableFile file)booleanclose(AReadableFile file)longcopyFrom(AReadableFile source, long sourcePosition, long length, AWritableFile targetSubject)longcopyFrom(AReadableFile source, long sourcePosition, AWritableFile targetSubject)longcopyFrom(AReadableFile source, AWritableFile targetSubject)protected longcopyGeneric(AReadableFile source, long sourcePosition, AWritableFile target)protected longcopyGeneric(AReadableFile source, long sourcePosition, AWritableFile target, long length)protected longcopyGeneric(AReadableFile source, AWritableFile target)longcopyTo(AReadableFile sourceSubject, long sourcePosition, long length, AWritableFile target)longcopyTo(AReadableFile sourceSubject, long sourcePosition, AWritableFile target)longcopyTo(AReadableFile sourceSubject, AWritableFile target)voidcreate(ADirectory directory)voidcreate(AWritableFile file)protected RuntimeExceptioncreateUnhandledTypeException(Object subject, Class<?> checkedType)protected RuntimeExceptioncreateUnhandledTypeException(Object subject, Class<?> checkedType, int cutStackTrace)protected RuntimeExceptioncreateUnhandledTypeExceptionDirectory(Object subject)protected RuntimeExceptioncreateUnhandledTypeExceptionFile(Object subject)protected RuntimeExceptioncreateUnhandledTypeExceptionItem(Object subject)protected RuntimeExceptioncreateUnhandledTypeExceptionReadableFile(Object subject)protected RuntimeExceptioncreateUnhandledTypeExceptionWritableFile(Object subject)booleandeleteFile(AWritableFile file)booleanensureExists(ADirectory directory)booleanensureExists(AWritableFile file)booleanexists(ADirectory directory)booleanexists(AFile file)voidinventorize(ADirectory directory)booleanisEmpty(ADirectory directory)booleanisHandledDirectory(ADirectory directory)booleanisHandledFile(AFile file)booleanisHandledItem(AItem item)booleanisHandledReadableFile(AReadableFile file)booleanisHandledWritableFile(AWritableFile file)booleanisOpen(AReadableFile file)booleanisWritable()XGettingEnum<String>listDirectories(ADirectory parent)XGettingEnum<String>listFiles(ADirectory parent)XGettingEnum<String>listItems(ADirectory parent)voidmoveFile(AWritableFile sourceFile, AWritableFile targetFile)booleanopenReading(AReadableFile file)booleanopenWriting(AWritableFile file)ByteBufferreadBytes(AReadableFile sourceFile)ByteBufferreadBytes(AReadableFile sourceFile, long position)ByteBufferreadBytes(AReadableFile sourceFile, long position, long length)longreadBytes(AReadableFile sourceFile, ByteBuffer targetBuffer)longreadBytes(AReadableFile sourceFile, ByteBuffer targetBuffer, long position)longreadBytes(AReadableFile sourceFile, ByteBuffer targetBuffer, long position, long length)longreadBytes(AReadableFile sourceFile, BufferProvider bufferProvider)longreadBytes(AReadableFile sourceFile, BufferProvider bufferProvider, long position)longreadBytes(AReadableFile sourceFile, BufferProvider bufferProvider, long position, long length)longsize(AFile file)protected abstract booleanspecificClose(R file)protected abstract longspecificCopyFrom(AReadableFile source, long sourcePosition, long length, W targetSubject)protected abstract longspecificCopyFrom(AReadableFile source, long sourcePosition, W targetSubject)protected abstract longspecificCopyFrom(AReadableFile source, W targetSubject)protected abstract longspecificCopyTo(R sourceSubject, long sourcePosition, long length, AWritableFile target)protected abstract longspecificCopyTo(R sourceSubject, long sourcePosition, AWritableFile target)protected abstract longspecificCopyTo(R sourceSubject, AWritableFile target)protected abstract voidspecificCreate(D file)protected abstract voidspecificCreate(W file)protected abstract booleanspecificDeleteFile(W file)protected abstract booleanspecificExists(D directory)protected abstract booleanspecificExists(F file)protected abstract voidspecificInventorize(D directory)protected abstract booleanspecificIsEmpty(D directory)protected abstract booleanspecificIsOpen(R file)protected abstract XGettingEnum<String>specificListDirectories(D parent)protected abstract XGettingEnum<String>specificListFiles(D parent)protected abstract XGettingEnum<String>specificListItems(D parent)protected abstract voidspecificMoveFile(W sourceFile, AWritableFile targetFile)protected abstract booleanspecificOpenReading(R file)protected abstract booleanspecificOpenWriting(W file)protected abstract ByteBufferspecificReadBytes(R sourceFile)protected abstract ByteBufferspecificReadBytes(R sourceFile, long position)protected abstract ByteBufferspecificReadBytes(R sourceFile, long position, long length)protected abstract longspecificReadBytes(R sourceFile, ByteBuffer targetBuffer)protected abstract longspecificReadBytes(R sourceFile, ByteBuffer targetBuffer, long position)protected abstract longspecificReadBytes(R sourceFile, ByteBuffer targetBuffer, long position, long length)protected abstract longspecificReadBytes(R sourceFile, BufferProvider bufferProvider)protected abstract longspecificReadBytes(R sourceFile, BufferProvider bufferProvider, long position)protected abstract longspecificReadBytes(R sourceFile, BufferProvider bufferProvider, long position, long length)protected abstract longspecificSize(F file)protected abstract voidspecificTruncateFile(W file, long newSize)protected abstract longspecificWriteBytes(W targetFile, Iterable<? extends ByteBuffer> sourceBuffers)protected abstract booleansubjectDirectoryExists(DS directory)protected abstract booleansubjectFileExists(FS file)protected abstract longsubjectFileSize(FS file)protected abstract DStoSubjectDirectory(ADirectory directory)protected abstract FStoSubjectFile(AFile file)voidtruncate(AWritableFile file, long newSize)voidvalidateHandledDirectory(ADirectory directory)voidvalidateHandledFile(AFile file)voidvalidateHandledReadableFile(AReadableFile file)voidvalidateHandledWritableFile(AWritableFile file)voidvalidateIsWritable()longwriteBytes(AWritableFile targetFile, Iterable<? extends ByteBuffer> sourceBuffers)
-
-
-
Method Detail
-
validateIsWritable
public final void validateIsWritable()
- Specified by:
validateIsWritablein interfaceWriteController
-
isWritable
public final boolean isWritable()
- Specified by:
isWritablein interfaceWriteController
-
specificSize
protected abstract long specificSize(F file)
-
specificExists
protected abstract boolean specificExists(F file)
-
specificExists
protected abstract boolean specificExists(D directory)
-
specificListItems
protected abstract XGettingEnum<String> specificListItems(D parent)
-
specificListDirectories
protected abstract XGettingEnum<String> specificListDirectories(D parent)
-
specificListFiles
protected abstract XGettingEnum<String> specificListFiles(D parent)
-
specificInventorize
protected abstract void specificInventorize(D directory)
-
specificIsEmpty
protected abstract boolean specificIsEmpty(D directory)
-
specificIsOpen
protected abstract boolean specificIsOpen(R file)
-
specificOpenReading
protected abstract boolean specificOpenReading(R file)
-
specificOpenWriting
protected abstract boolean specificOpenWriting(W file)
-
specificClose
protected abstract boolean specificClose(R file)
-
specificCreate
protected abstract void specificCreate(D file)
-
specificCreate
protected abstract void specificCreate(W file)
-
specificReadBytes
protected abstract ByteBuffer specificReadBytes(R sourceFile)
-
specificReadBytes
protected abstract ByteBuffer specificReadBytes(R sourceFile, long position)
-
specificReadBytes
protected abstract ByteBuffer specificReadBytes(R sourceFile, long position, long length)
-
specificReadBytes
protected abstract long specificReadBytes(R sourceFile, ByteBuffer targetBuffer)
-
specificReadBytes
protected abstract long specificReadBytes(R sourceFile, ByteBuffer targetBuffer, long position)
-
specificReadBytes
protected abstract long specificReadBytes(R sourceFile, ByteBuffer targetBuffer, long position, long length)
-
specificReadBytes
protected abstract long specificReadBytes(R sourceFile, BufferProvider bufferProvider)
-
specificReadBytes
protected abstract long specificReadBytes(R sourceFile, BufferProvider bufferProvider, long position)
-
specificReadBytes
protected abstract long specificReadBytes(R sourceFile, BufferProvider bufferProvider, long position, long length)
-
specificCopyTo
protected abstract long specificCopyTo(R sourceSubject, AWritableFile target)
-
specificCopyTo
protected abstract long specificCopyTo(R sourceSubject, long sourcePosition, AWritableFile target)
-
specificCopyTo
protected abstract long specificCopyTo(R sourceSubject, long sourcePosition, long length, AWritableFile target)
-
specificCopyFrom
protected abstract long specificCopyFrom(AReadableFile source, W targetSubject)
-
specificCopyFrom
protected abstract long specificCopyFrom(AReadableFile source, long sourcePosition, W targetSubject)
-
specificCopyFrom
protected abstract long specificCopyFrom(AReadableFile source, long sourcePosition, long length, W targetSubject)
-
specificWriteBytes
protected abstract long specificWriteBytes(W targetFile, Iterable<? extends ByteBuffer> sourceBuffers)
-
specificMoveFile
protected abstract void specificMoveFile(W sourceFile, AWritableFile targetFile)
-
specificDeleteFile
protected abstract boolean specificDeleteFile(W file)
-
specificTruncateFile
protected abstract void specificTruncateFile(W file, long newSize)
-
copyGeneric
protected long copyGeneric(AReadableFile source, AWritableFile target)
-
copyGeneric
protected long copyGeneric(AReadableFile source, long sourcePosition, AWritableFile target)
-
copyGeneric
protected long copyGeneric(AReadableFile source, long sourcePosition, AWritableFile target, long length)
-
createUnhandledTypeException
protected RuntimeException createUnhandledTypeException(Object subject, Class<?> checkedType)
-
createUnhandledTypeException
protected RuntimeException createUnhandledTypeException(Object subject, Class<?> checkedType, int cutStackTrace)
-
createUnhandledTypeExceptionItem
protected RuntimeException createUnhandledTypeExceptionItem(Object subject)
-
createUnhandledTypeExceptionFile
protected RuntimeException createUnhandledTypeExceptionFile(Object subject)
-
createUnhandledTypeExceptionDirectory
protected RuntimeException createUnhandledTypeExceptionDirectory(Object subject)
-
createUnhandledTypeExceptionReadableFile
protected RuntimeException createUnhandledTypeExceptionReadableFile(Object subject)
-
createUnhandledTypeExceptionWritableFile
protected RuntimeException createUnhandledTypeExceptionWritableFile(Object subject)
-
isHandledItem
public boolean isHandledItem(AItem item)
- Specified by:
isHandledItemin interfaceAIoHandler
-
isHandledFile
public boolean isHandledFile(AFile file)
- Specified by:
isHandledFilein interfaceAIoHandler
-
isHandledDirectory
public boolean isHandledDirectory(ADirectory directory)
- Specified by:
isHandledDirectoryin interfaceAIoHandler
-
isHandledReadableFile
public boolean isHandledReadableFile(AReadableFile file)
- Specified by:
isHandledReadableFilein interfaceAIoHandler
-
isHandledWritableFile
public boolean isHandledWritableFile(AWritableFile file)
- Specified by:
isHandledWritableFilein interfaceAIoHandler
-
validateHandledFile
public final void validateHandledFile(AFile file)
- Specified by:
validateHandledFilein interfaceAIoHandler
-
validateHandledDirectory
public final void validateHandledDirectory(ADirectory directory)
- Specified by:
validateHandledDirectoryin interfaceAIoHandler
-
validateHandledReadableFile
public final void validateHandledReadableFile(AReadableFile file)
- Specified by:
validateHandledReadableFilein interfaceAIoHandler
-
validateHandledWritableFile
public final void validateHandledWritableFile(AWritableFile file)
- Specified by:
validateHandledWritableFilein interfaceAIoHandler
-
castReadableFile
protected R castReadableFile(AReadableFile file)
-
castWritableFile
protected W castWritableFile(AWritableFile file)
-
toSubjectDirectory
protected abstract DS toSubjectDirectory(ADirectory directory)
-
subjectFileSize
protected abstract long subjectFileSize(FS file)
-
subjectFileExists
protected abstract boolean subjectFileExists(FS file)
-
subjectDirectoryExists
protected abstract boolean subjectDirectoryExists(DS directory)
-
size
public long size(AFile file)
- Specified by:
sizein interfaceAIoHandler
-
exists
public boolean exists(AFile file)
- Specified by:
existsin interfaceAIoHandler
-
exists
public boolean exists(ADirectory directory)
- Specified by:
existsin interfaceAIoHandler
-
listItems
public XGettingEnum<String> listItems(ADirectory parent)
- Specified by:
listItemsin interfaceAIoHandler
-
listDirectories
public XGettingEnum<String> listDirectories(ADirectory parent)
- Specified by:
listDirectoriesin interfaceAIoHandler
-
listFiles
public XGettingEnum<String> listFiles(ADirectory parent)
- Specified by:
listFilesin interfaceAIoHandler
-
inventorize
public void inventorize(ADirectory directory)
- Specified by:
inventorizein interfaceAIoHandler
-
isEmpty
public boolean isEmpty(ADirectory directory)
- Specified by:
isEmptyin interfaceAIoHandler
-
openReading
public boolean openReading(AReadableFile file)
- Specified by:
openReadingin interfaceAIoHandler
-
isOpen
public boolean isOpen(AReadableFile file)
- Specified by:
isOpenin interfaceAIoHandler
-
close
public boolean close(AReadableFile file)
- Specified by:
closein interfaceAIoHandler
-
openWriting
public boolean openWriting(AWritableFile file)
- Specified by:
openWritingin interfaceAIoHandler
-
create
public void create(ADirectory directory)
- Specified by:
createin interfaceAIoHandler
-
create
public void create(AWritableFile file)
- Specified by:
createin interfaceAIoHandler
-
ensureExists
public boolean ensureExists(ADirectory directory)
- Specified by:
ensureExistsin interfaceAIoHandler
-
ensureExists
public boolean ensureExists(AWritableFile file)
- Specified by:
ensureExistsin interfaceAIoHandler
-
readBytes
public ByteBuffer readBytes(AReadableFile sourceFile)
- Specified by:
readBytesin interfaceAIoHandler
-
readBytes
public ByteBuffer readBytes(AReadableFile sourceFile, long position)
- Specified by:
readBytesin interfaceAIoHandler
-
readBytes
public ByteBuffer readBytes(AReadableFile sourceFile, long position, long length)
- Specified by:
readBytesin interfaceAIoHandler
-
readBytes
public long readBytes(AReadableFile sourceFile, ByteBuffer targetBuffer)
- Specified by:
readBytesin interfaceAIoHandler
-
readBytes
public long readBytes(AReadableFile sourceFile, ByteBuffer targetBuffer, long position)
- Specified by:
readBytesin interfaceAIoHandler
-
readBytes
public long readBytes(AReadableFile sourceFile, ByteBuffer targetBuffer, long position, long length)
- Specified by:
readBytesin interfaceAIoHandler
-
readBytes
public long readBytes(AReadableFile sourceFile, BufferProvider bufferProvider)
- Specified by:
readBytesin interfaceAIoHandler
-
readBytes
public long readBytes(AReadableFile sourceFile, BufferProvider bufferProvider, long position)
- Specified by:
readBytesin interfaceAIoHandler
-
readBytes
public long readBytes(AReadableFile sourceFile, BufferProvider bufferProvider, long position, long length)
- Specified by:
readBytesin interfaceAIoHandler
-
copyTo
public long copyTo(AReadableFile sourceSubject, AWritableFile target)
- Specified by:
copyToin interfaceAIoHandler
-
copyTo
public long copyTo(AReadableFile sourceSubject, long sourcePosition, AWritableFile target)
- Specified by:
copyToin interfaceAIoHandler
-
copyTo
public long copyTo(AReadableFile sourceSubject, long sourcePosition, long length, AWritableFile target)
- Specified by:
copyToin interfaceAIoHandler
-
copyFrom
public long copyFrom(AReadableFile source, AWritableFile targetSubject)
- Specified by:
copyFromin interfaceAIoHandler
-
copyFrom
public long copyFrom(AReadableFile source, long sourcePosition, AWritableFile targetSubject)
- Specified by:
copyFromin interfaceAIoHandler
-
copyFrom
public long copyFrom(AReadableFile source, long sourcePosition, long length, AWritableFile targetSubject)
- Specified by:
copyFromin interfaceAIoHandler
-
writeBytes
public long writeBytes(AWritableFile targetFile, Iterable<? extends ByteBuffer> sourceBuffers)
- Specified by:
writeBytesin interfaceAIoHandler
-
moveFile
public void moveFile(AWritableFile sourceFile, AWritableFile targetFile)
- Specified by:
moveFilein interfaceAIoHandler
-
deleteFile
public boolean deleteFile(AWritableFile file)
- Specified by:
deleteFilein interfaceAIoHandler
-
truncate
public void truncate(AWritableFile file, long newSize)
- Specified by:
truncatein interfaceAIoHandler
-
-