public class BinaryLightVirtualFile extends LightVirtualFileBase
VirtualFile.VirtualFile.PropNameEMPTY_ARRAY, PROP_ENCODING, PROP_HIDDEN, PROP_NAME, PROP_SYMLINK_TARGET, PROP_WRITABLEEVER_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, setWritablecontentsToByteArray, 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, storeCharsetchangeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMappublic 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
VirtualFileInputStream for this file.
Skips BOM if there is any. See Unicode Byte Order Mark FAQ for an explanation.getInputStream in class VirtualFileInputStreamjava.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
VirtualFileGets 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 VirtualFilerequestor - 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 setOutputStreamjava.io.IOException - if an I/O error occursVirtualFile.getModificationStamp()public byte [] contentsToByteArray()
throws java.io.IOException
VirtualFilecontentsToByteArray in class VirtualFilejava.io.IOException - if an I/O error occursVirtualFile.contentsToByteArray(boolean),
VirtualFile.getInputStream()public byte [] getContent()
public java.lang.String toString()
toString in class VirtualFile