@Override public InputStream getContents() throws CoreException { return storage.getContents(); }
@Override public InputStream getContents() throws CoreException { return storage.getContents(); }
public InputStream getContents() throws CoreException { return storage.getContents(); } public String getCharset() throws CoreException {
public InputStream getContents() throws CoreException { return storage.getContents(); }
public InputStream getContents() throws CoreException { return storage.getContents(); }
public static BufferedReader createReader(IStorage storage) throws CoreException { return new BufferedReader(new InputStreamReader(storage.getContents())); }
public InputStream getContents() throws CoreException { if (bufferedContents == null) { cacheContents(new NullProgressMonitor()); } if (bufferedContents != null) { return bufferedContents.getContents(); } return null; }
public InputStream getContents() throws CoreException { if (bufferedContents == null) { cacheContents(new NullProgressMonitor()); } if (bufferedContents != null) { return bufferedContents.getContents(); } return null; }
@Override public InputStream getContents() throws CoreException { if (bufferedContents == null) { cacheContents(new NullProgressMonitor()); } if (bufferedContents != null) { return bufferedContents.getContents(); } return null; }
@Override protected InputStream getContents(URI uri, IProject project) throws CoreException { return findStorage(uri, project).getContents(); }
/** * */ public void set(IStorage iStorage) throws CoreException { resetAll(); InputStream inputStream = iStorage.getContents(); InputStream resettableStream = new BufferedInputStream(inputStream, CodedIO.MAX_BUF_SIZE); resettableStream.mark(CodedIO.MAX_MARK_SIZE); set(resettableStream); // TODO we'll need to "remember" IFile, or // get its (or its project's) settings, in case // those are needed to handle cases when the // encoding is not in the file stream. }
/** * */ public void set(IStorage iStorage) throws CoreException { resetAll(); InputStream inputStream = iStorage.getContents(); InputStream resettableStream = new BufferedInputStream(inputStream, CodedIO.MAX_BUF_SIZE); resettableStream.mark(CodedIO.MAX_MARK_SIZE); set(resettableStream); // TODO we'll need to "remember" IFile, or // get its (or its project's) settings, in case // those are needed to handle cases when the // encoding is not in the file stream. }
public static LineComparator create(IStorage storage, String outputEncoding) throws CoreException, IOException { InputStream is = new BufferedInputStream(storage.getContents()); try { String encoding = getEncoding(storage, outputEncoding); return new LineComparator(is, encoding); } finally { try { is.close(); } catch (IOException e) { // Ignore } } }
public static LineComparator create(IStorage storage, String outputEncoding) throws CoreException, IOException { InputStream is = new BufferedInputStream(storage.getContents()); try { String encoding = getEncoding(storage, outputEncoding); return new LineComparator(is, encoding); } finally { try { is.close(); } catch (IOException e) { // Ignore } } }
/** * */ public void set(IStorage iStorage) throws CoreException { resetAll(); InputStream inputStream = iStorage.getContents(); InputStream resettableStream = new BufferedInputStream(inputStream, CodedIO.MAX_BUF_SIZE); resettableStream.mark(CodedIO.MAX_MARK_SIZE); set(resettableStream); // TODO we'll need to "remember" IFile, or // get its (or its project's) settings, in case // those are needed to handle cases when the // encoding is not in the file stream. }
protected void loadSchema(boolean abbreviated) { fSchema = new Schema(this, null, false); try { InputStream stream = fStorage.getContents(); fSchema.load(fStorage.getContents()); stream.close(); } catch (CoreException e) { PDECore.logException(e); } catch (IOException e) { PDECore.logException(e); } }
/** * */ public void set(IStorage iStorage) throws CoreException { resetAll(); InputStream inputStream = iStorage.getContents(); InputStream resettableStream = new BufferedInputStream(inputStream, CodedIO.MAX_BUF_SIZE); resettableStream.mark(CodedIO.MAX_MARK_SIZE); set(resettableStream); // TODO we'll need to "remember" IFile, or // get its (or its project's) settings, in case // those are needed to handle cases when the // encoding is not in the file stream. }
public static SourceMap createFrom(IStorage storage) throws IOException, CoreException { Reader reader; if (storage instanceof IFile) { reader = new InputStreamReader(storage.getContents(), ((IFile) storage).getCharset()); } else { reader = new InputStreamReader(storage.getContents()); } try { String contents = Streams.loadAndClose(reader); return createFrom(storage.getFullPath(), contents); } catch (JSONException e) { throw new IOException(e); } finally { reader.close(); } }
protected void loadSchema(boolean abbreviated) { fSchema = new Schema(this, null, false); try { InputStream stream = fStorage.getContents(); fSchema.load(fStorage.getContents()); stream.close(); } catch (CoreException e) { PDECore.logException(e); } catch (IOException e) { PDECore.logException(e); } }
private Properties loadContent() { IStorageEditorInput input = (IStorageEditorInput) getEditorInput(); Properties properties = new Properties(); try { IStorage storage = input.getStorage(); try (InputStream is = storage.getContents()) { properties.load(is); } catch (IOException e) { PDEPlugin.logException(e); } } catch (CoreException e) { PDEPlugin.logException(e); } return properties; }