@Override public OutputStream createOutputStream(URI uri) throws IOException { return existing.createOutputStream(uri); }
@Override public OutputStream createOutputStream(URI uri, Map<?, ?> options) throws IOException { return existing.createOutputStream(uri, options); }
@Override protected OutputStream createOutputStream(String nestedURL) throws IOException { return getURIConverter(options).createOutputStream(URI.createURI(nestedURL), options); } @Override
@Override protected OutputStream createOutputStream(String nestedURL) throws IOException { return getURIConverter(options).createOutputStream(URI.createURI(nestedURL), options); } @Override
/** * @see com.ibm.etools.archive.SaveStrategy */ public void save(org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest aManifest) throws SaveFailureException { try { OutputStream out = getUriConverter().createOutputStream(URI.createURI(J2EEConstants.MANIFEST_URI)); aManifest.write(out); out.close(); } catch (IOException iox) { throw new SaveFailureException(J2EEConstants.MANIFEST_URI, iox); } }
/** * @see com.ibm.etools.archive.impl.SaveStrategyImpl */ protected java.io.OutputStream getOutputStreamForResource(Resource aResource) throws java.io.IOException { return getUriConverter().createOutputStream(aResource.getURI()); }
/** * @see com.ibm.etools.archive.impl.SaveStrategyImpl */ protected java.io.OutputStream getOutputStreamForResource(Resource aResource) throws java.io.IOException { return getUriConverter().createOutputStream(aResource.getURI()); }
/** * Creates an <code>OutputStream</code> for the file identified by the given workspace path URI. */ protected OutputStream createOutputStream(URI workspacePath) throws Exception { return getURIConverter().createOutputStream(toPlatformResourceURI(workspacePath)); }
/** * @see com.ibm.etools.archive.impl.SaveStrategyImpl */ protected SaveStrategy createNestedZipStrategy(Archive anArchive) throws IOException { OutputStream out = getUriConverter().createOutputStream(URI.createURI(anArchive.getURI())); return new ZipStreamSaveStrategyImpl(out); }
/** * @deprecated In EMF 2.2, a {@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapter GeneratorAdapter} should be used to * implement code generation. {@link org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter AbstractGeneratorAdapter} provides * an equivalent to this method. This method will be removed after 2.2. */ @Deprecated public OutputStream createOutputStream(URI uri) throws Exception { URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); return uriConverter.createOutputStream(uri); }
/** * @see com.ibm.etools.archive.impl.SaveStrategyImpl */ protected SaveStrategy createNestedZipStrategy(Archive anArchive) throws IOException { OutputStream out = getUriConverter().createOutputStream(URI.createURI(anArchive.getURI())); return new ZipStreamSaveStrategyImpl(out); }
/** * @deprecated In EMF 2.2, a {@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapter GeneratorAdapter} should be used to * implement code generation. {@link org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter AbstractGeneratorAdapter} provides * an equivalent to this method. This method will be removed after 2.2. */ @Deprecated public OutputStream createOutputStream(URI uri) throws Exception { URIConverter uriConverter = eResource().getResourceSet().getURIConverter(); return uriConverter.createOutputStream(uri); }
if (resolvedLocation != null) return ((URIConverter)options.get(URIConverter.OPTION_URI_CONVERTER)).createOutputStream(resolvedLocation, options);
/** * Creates an <code>OutputStream</code> for the file identified by the given workspace path URI. * Calls back to the generator to indicate output was {@link Generator#generatedOutput(URI) generated}. */ protected OutputStream createOutputStream(URI workspacePath) throws Exception { OutputStream result; if (EMFPlugin.IS_ECLIPSE_RUNNING) { result = URIConverter.INSTANCE.createOutputStream(toPlatformResourceURI(workspacePath), null); } else { result = getURIConverter().createOutputStream(toPlatformResourceURI(workspacePath), null); } getGenerator().generatedOutput(workspacePath); return result; }
if (resolvedLocation != null) return ((URIConverter)options.get(URIConverter.OPTION_URI_CONVERTER)).createOutputStream(resolvedLocation, options);
final OutputStream out = this.getURIConverter().createOutputStream(uri); try { ByteStreams.copy(source, out);
/** * @see com.ibm.etools.archive.SaveStrategy */ public void save(org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest aManifest) throws SaveFailureException { try { OutputStream out = getUriConverter().createOutputStream(URI.createURI(J2EEConstants.MANIFEST_URI)); aManifest.write(out); out.close(); if (getArchive().getOptions().isReadOnly()) setTimestampAfterSaving(J2EEConstants.MANIFEST_URI); } catch (IOException iox) { throw new SaveFailureException(J2EEConstants.MANIFEST_URI, iox); } }
/** * @see com.ibm.etools.archive.impl.SaveStrategyImpl */ public void save(org.eclipse.jst.j2ee.commonarchivecore.internal.File aFile, InputStream in) throws SaveFailureException { String entryName = aFile.getURI(); if (aFile.isDirectoryEntry()) mkdirs(entryName); else { try { OutputStream out = getUriConverter().createOutputStream(URI.createURI(entryName)); org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil.copy(in, out); } catch (IOException iox) { throw new SaveFailureException(aFile.getURI(), iox); } } }
@Override public void put(final IXtextWebDocument document, final IServiceContext serviceContext) throws IOException { try { try { final URI uri = this.resourceBaseProvider.getFileURI(document.getResourceId()); final OutputStream outputStream = document.getResource().getResourceSet().getURIConverter().createOutputStream(uri); String _encoding = this.encodingProvider.getEncoding(uri); final OutputStreamWriter writer = new OutputStreamWriter(outputStream, _encoding); writer.write(document.getText()); writer.close(); } catch (final Throwable _t) { if (_t instanceof WrappedException) { final WrappedException exception = (WrappedException)_t; throw exception.getCause(); } else { throw Exceptions.sneakyThrow(_t); } } } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } } }
/** * @see com.ibm.etools.archive.impl.SaveStrategyImpl */ public void save(org.eclipse.jst.j2ee.commonarchivecore.internal.File aFile, InputStream in) throws SaveFailureException { String entryName = aFile.getURI(); if (aFile.isDirectoryEntry()) mkdirs(entryName); else { try { OutputStream out = getUriConverter().createOutputStream(URI.createURI(entryName)); ArchiveUtil.copy(in, out); setTimestampAfterSaving(aFile); } catch (IOException iox) { throw new SaveFailureException(aFile.getURI(), iox); } } }