public class GenericFile<T> extends Object implements WrappedFile<T>
Constructor and Description |
---|
GenericFile() |
Modifier and Type | Method and Description |
---|---|
void |
bindToExchange(Exchange exchange)
Bind this GenericFile to an Exchange
|
void |
changeFileName(String newName)
Changes the name of this remote file.
|
GenericFile<T> |
copyFrom(GenericFile<T> source)
Creates a copy based on the source
|
void |
copyFromPopulateAdditional(GenericFile<T> source,
GenericFile<T> result)
Copies additional information from the source to the result.
|
String |
getAbsoluteFilePath() |
GenericFileBinding<T> |
getBinding() |
Object |
getBody() |
String |
getCharset() |
String |
getEndpointPath() |
T |
getFile()
Gets the file.
|
long |
getFileLength() |
String |
getFileName() |
String |
getFileNameOnly() |
char |
getFileSeparator() |
long |
getLastModified() |
String |
getParent() |
String |
getRelativeFilePath() |
boolean |
isAbsolute() |
protected boolean |
isAbsolute(String name) |
boolean |
isDirectory() |
protected String |
normalizePath(String name) |
protected String |
normalizePathToProtocol(String path)
Fixes the path separator to be according to the protocol
|
void |
populateHeaders(GenericFileMessage<T> message)
Populates the
GenericFileMessage relevant headers |
void |
setAbsolute(boolean absolute) |
void |
setAbsoluteFilePath(String absoluteFilePath) |
void |
setBinding(GenericFileBinding<T> binding) |
void |
setBody(Object os) |
void |
setCharset(String charset) |
void |
setDirectory(boolean directory) |
void |
setEndpointPath(String endpointPath) |
void |
setFile(T file) |
void |
setFileLength(long fileLength) |
void |
setFileName(String fileName) |
void |
setFileNameOnly(String fileNameOnly) |
void |
setLastModified(long lastModified) |
void |
setRelativeFilePath(String relativeFilePath) |
String |
toString() |
public GenericFile()
public char getFileSeparator()
public GenericFile<T> copyFrom(GenericFile<T> source)
source
- the sourcepublic void copyFromPopulateAdditional(GenericFile<T> source, GenericFile<T> result)
source
- the sourceresult
- the resultpublic void bindToExchange(Exchange exchange)
public void populateHeaders(GenericFileMessage<T> message)
GenericFileMessage
relevant headersmessage
- the message to populate with headersprotected boolean isAbsolute(String name)
protected String normalizePath(String name)
public void changeFileName(String newName)
newName
- the new namepublic String getRelativeFilePath()
public void setRelativeFilePath(String relativeFilePath)
public String getFileName()
public void setFileName(String fileName)
public long getFileLength()
public void setFileLength(long fileLength)
public long getLastModified()
public void setLastModified(long lastModified)
public String getCharset()
public void setCharset(String charset)
public T getFile()
WrappedFile
getFile
in interface WrappedFile<T>
public GenericFileBinding<T> getBinding()
public void setBinding(GenericFileBinding<T> binding)
public void setAbsoluteFilePath(String absoluteFilePath)
public String getAbsoluteFilePath()
public boolean isAbsolute()
public void setAbsolute(boolean absolute)
public String getEndpointPath()
public void setEndpointPath(String endpointPath)
public String getFileNameOnly()
public void setFileNameOnly(String fileNameOnly)
public boolean isDirectory()
public void setDirectory(boolean directory)
protected String normalizePathToProtocol(String path)
Apache Camel