IPath filePath = ((IFileEditorInput)editorInput).getFile().getLocation();
fileExtension = filePath.getFileExtension();
fileOutputStream = new FileOutputStream(filePath.toOSString());
}
if(fileOutputStream != null) {
IFilter usedFilter = null;
if(fileExtension != null && fileExtension.length() > 0) {
IFilter[] filter = document.getFilterProvider().getFilters();
for(int i = 0; i < filter.length; i++) {
if(filter[i].getFileExtension(document).equalsIgnoreCase(fileExtension)) {
usedFilter = filter[i];