@Override protected void doLoad(InputStream inputStream, Map<?, ?> options) throws IOException { if (options == null) { options = Collections.<String, Object>emptyMap(); } if (inputStream instanceof URIConverter.Loadable) { ((URIConverter.Loadable) inputStream).loadResource(this); } else { ContextAttributes attributes = EMFContext .from(options) .withPerCallAttribute(RESOURCE_SET, getResourceSet()) .withPerCallAttribute(RESOURCE, this); mapper.reader() .with(attributes) .forType(Resource.class) .withValueToUpdate(this) .readValue(inputStream); } }
((URIConverter.Loadable)inputStream).loadResource(this);
((URIConverter.Loadable)inputStream).loadResource(this);
@Override protected void doLoad(InputStream inputStream, Map<?, ?> options) throws IOException { if (inputStream instanceof URIConverter.Loadable) { ((URIConverter.Loadable)inputStream).loadResource(this); } else { if (!(inputStream instanceof BufferedInputStream)) { int bufferCapacity = getBufferCapacity(options); if (bufferCapacity > 0) { inputStream = new BufferedInputStream(inputStream, bufferCapacity); } } EObjectInputStream eObjectInputStream = createEObjectInputStream(inputStream, options); eObjectInputStream.loadResource(this); eObjectInputStream.flush(); } }
@Override protected void doLoad(InputStream inputStream, Map<?, ?> options) throws IOException { if (inputStream instanceof URIConverter.Loadable) { ((URIConverter.Loadable)inputStream).loadResource(this); } else { if (!(inputStream instanceof BufferedInputStream)) { int bufferCapacity = getBufferCapacity(options); if (bufferCapacity > 0) { inputStream = new BufferedInputStream(inputStream, bufferCapacity); } } EObjectInputStream eObjectInputStream = createEObjectInputStream(inputStream, options); eObjectInputStream.loadResource(this); eObjectInputStream.flush(); } }
@Override protected void doLoad(InputStream inputStream, Map<?, ?> options) throws IOException { if (options == null) { options = Collections.<String, Object>emptyMap(); } if (inputStream instanceof URIConverter.Loadable) { ((URIConverter.Loadable) inputStream).loadResource(this); } else { ContextAttributes attributes = EMFContext .from(options) .withPerCallAttribute(RESOURCE_SET, getResourceSet()) .withPerCallAttribute(RESOURCE, this); mapper.reader() .with(attributes) .forType(Resource.class) .withValueToUpdate(this) .readValue(inputStream); } }