本文整理汇总了Java中com.intellij.openapi.vfs.VfsUtilCore.outputStreamAddingBOM方法的典型用法代码示例。如果您正苦于以下问题:Java VfsUtilCore.outputStreamAddingBOM方法的具体用法?Java VfsUtilCore.outputStreamAddingBOM怎么用?Java VfsUtilCore.outputStreamAddingBOM使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.vfs.VfsUtilCore
的用法示例。
在下文中一共展示了VfsUtilCore.outputStreamAddingBOM方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOutputStream
import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
@Override
@NotNull
public OutputStream getOutputStream(Object requestor, final long newModificationStamp, long newTimeStamp) throws IOException {
return VfsUtilCore.outputStreamAddingBOM(new ByteArrayOutputStream() {
@Override
public void close() {
setModificationStamp(newModificationStamp);
try {
String content = toString(getCharset().name());
setContent(content);
}
catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
}, this);
}
示例2: getOutputStream
import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
@Override
@NotNull
public OutputStream getOutputStream(Object requestor, final long newModificationStamp, long newTimeStamp) throws IOException {
return VfsUtilCore.outputStreamAddingBOM(new ByteArrayOutputStream() {
@Override
public void close() {
setModificationStamp(newModificationStamp);
byte[] content = toByteArray();
setContent(content);
}
}, this);
}
示例3: getOutputStream
import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
@Override
@NotNull
public OutputStream getOutputStream(final Object requestor, final long newModificationStamp, long newTimeStamp) throws IOException {
return VfsUtilCore.outputStreamAddingBOM(new ByteArrayOutputStream() {
@Override
public void close() {
final DummyFileSystem fs = (DummyFileSystem)getFileSystem();
fs.fireBeforeContentsChange(requestor, VirtualFileDataImpl.this);
final long oldModStamp = myModificationStamp;
myContents = toByteArray();
myModificationStamp = newModificationStamp >= 0 ? newModificationStamp : LocalTimeCounter.currentTime();
fs.fireContentsChanged(requestor, VirtualFileDataImpl.this, oldModStamp);
}
},this);
}
示例4: getOutputStream
import com.intellij.openapi.vfs.VfsUtilCore; //导入方法依赖的package包/类
@Override
@NotNull
public OutputStream getOutputStream(final Object requestor, final long modStamp, final long timeStamp) throws IOException {
return VfsUtilCore.outputStreamAddingBOM(ourPersistence.getOutputStream(this, requestor, modStamp, timeStamp), this);
}