public class BinaryLightVirtualFile extends LightVirtualFileBase
VirtualFile
.VirtualFile.PropName
EMPTY_ARRAY, PROP_ENCODING, PROP_HIDDEN, PROP_NAME, PROP_SYMLINK_TARGET, PROP_WRITABLE
EVER_CHANGED, NEVER_CHANGED
Constructor and Description |
---|
BinaryLightVirtualFile(java.lang.String name) |
BinaryLightVirtualFile(java.lang.String name,
byte [] content) |
BinaryLightVirtualFile(java.lang.String name,
FileType fileType,
byte [] content) |
BinaryLightVirtualFile(java.lang.String name,
FileType fileType,
byte [] content,
long modificationStamp) |
Modifier and Type | Method and Description |
---|---|
byte [] |
contentsToByteArray()
Returns file content as an array of bytes.
|
byte [] |
getContent() |
java.io.InputStream |
getInputStream()
Gets the
InputStream for this file. |
java.io.OutputStream |
getOutputStream(java.lang.Object requestor,
long newModificationStamp,
long newTimeStamp)
Gets the
OutputStream for this file and sets modification stamp and time stamp to the specified values
after closing the stream. |
java.lang.String |
toString() |
createChildData, createChildDirectory, delete, getAssignedFileType, getChildren, getFileSystem, getLength, getModificationStamp, getName, getOriginalFile, getParent, getPath, getTimeStamp, isDirectory, isValid, isWritable, move, refresh, rename, setBinaryContent, setBinaryContent, setFileType, setModificationStamp, setOriginalFile, setValid, setWritable
contentsToByteArray, copy, exists, findChild, findFileByRelativePath, findOrCreateChildData, getBOM, getCanonicalFile, getCanonicalPath, getCharset, getDetectedLineSeparator, getExtension, getFileType, getModificationCount, getNameSequence, getNameWithoutExtension, getOutputStream, getPresentableName, getPresentableUrl, getUrl, is, isCharsetSet, isInLocalFileSystem, isRecursiveOrCircularSymLink, isValidName, nameEquals, refresh, setBinaryContent, setBOM, setCharset, setCharset, setCharset, setDetectedLineSeparator, setPreloadedContentHint, storeCharset
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
public BinaryLightVirtualFile(java.lang.String name)
public BinaryLightVirtualFile(java.lang.String name, byte [] content)
public BinaryLightVirtualFile(java.lang.String name, FileType fileType, byte [] content)
public BinaryLightVirtualFile(java.lang.String name, FileType fileType, byte [] content, long modificationStamp)
public java.io.InputStream getInputStream() throws java.io.IOException
VirtualFile
InputStream
for this file.
Skips BOM if there is any. See Unicode Byte Order Mark FAQ for an explanation.getInputStream
in class VirtualFile
InputStream
java.io.IOException
- if an I/O error occursVirtualFile.contentsToByteArray()
public java.io.OutputStream getOutputStream(java.lang.Object requestor, long newModificationStamp, long newTimeStamp) throws java.io.IOException
VirtualFile
Gets the OutputStream
for this file and sets modification stamp and time stamp to the specified values
after closing the stream.
Normally, you should not use this method.
Writes BOM first, if there is any. See Unicode Byte Order Mark FAQ for an explanation.
getOutputStream
in class VirtualFile
requestor
- any object to control who called this method. Note that
it is considered to be an external change if requestor
is null
.
See VirtualFileEvent.getRequestor()
and SafeWriteRequestor
.newModificationStamp
- new modification stamp or -1 if no special value should be setnewTimeStamp
- new time stamp or -1 if no special value should be setOutputStream
java.io.IOException
- if an I/O error occursVirtualFile.getModificationStamp()
public byte [] contentsToByteArray() throws java.io.IOException
VirtualFile
contentsToByteArray
in class VirtualFile
java.io.IOException
- if an I/O error occursVirtualFile.contentsToByteArray(boolean)
,
VirtualFile.getInputStream()
public byte [] getContent()
public java.lang.String toString()
toString
in class VirtualFile