org.eclipse.emf.ecore.resource.impl
Class BinaryResourceImpl
java.lang.Object
org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.NotifierImpl
org.eclipse.emf.ecore.resource.impl.ResourceImpl
org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl
- All Implemented Interfaces:
- Notifier, Resource, Resource.Internal
public class BinaryResourceImpl
- extends ResourceImpl
PROVISIONAL API for efficiently producing and consuming a compact binary serialization.
Absolutely any and all aspects of this design are likely to change arbitrarily.
It might not be wise to use this format for long term persistence while the API is provisional.
- Since:
- 2.4
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
contents, defaultDeleteOptions, defaultLoadOptions, defaultSaveOptions, errors, intrinsicIDToEObjectMap, isLoaded, isLoading, isModified, modificationTrackingAdapter, resourceSet, timeStamp, unloadingContents, uri, warnings |
Method Summary |
protected void |
doLoad(java.io.InputStream inputStream,
java.util.Map<?,?> options)
Called to load the resource. |
protected void |
doSave(java.io.OutputStream outputStream,
java.util.Map<?,?> options)
Called to save the resource. |
protected static int |
getBufferCapacity(java.util.Map<?,?> options)
Extract the OPTION_BUFFER_CAPACITY from the options. |
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
addModificationTrackingAdapters, attached, attachedHelper, basicSetResourceSet, createModificationTrackingAdapter, delete, detached, detachedHelper, doUnload, getAllContents, getAllProperContents, getAllProperContents, getContents, getDefaultURIConverter, getEObject, getEObject, getEObjectByID, getEObjectForURIFragmentRootSegment, getErrors, getIntrinsicIDToEObjectMap, getResourceSet, getTimeStamp, getURI, getURIConverter, getURIFragment, getURIFragmentRootSegment, getWarnings, isAttachedDetachedHelperRequired, isContentZipEntry, isLoaded, isLoading, isModified, isTrackingModification, load, load, mergeMaps, newContentZipEntry, removeModificationTrackingAdapters, save, save, saveOnlyIfChangedWithFileBuffer, saveOnlyIfChangedWithMemoryBuffer, setIntrinsicIDToEObjectMap, setLoaded, setModified, setTimeStamp, setTrackingModification, setURI, toKeyString, toString, unload, unloaded, useZip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OPTION_BUFFER_CAPACITY
public static final java.lang.String OPTION_BUFFER_CAPACITY
- Specify the capacity of the buffered stream
used when
saving
or loading
the resource content.
The value must be an integer.
If not specified, DEFAULT_BUFFER_CAPACITY
is used.
A value less than one disables the cache.
- Since:
- 2.6
- See Also:
- Constant Field Values
DEFAULT_BUFFER_CAPACITY
public static final int DEFAULT_BUFFER_CAPACITY
- The default
OPTION_BUFFER_CAPACITY
capacity of the buffered stream
used when saving
or loading
the resource content.
- Since:
- 2.6
- See Also:
- Constant Field Values
BinaryResourceImpl
public BinaryResourceImpl()
BinaryResourceImpl
public BinaryResourceImpl(URI uri)
getBufferCapacity
protected static int getBufferCapacity(java.util.Map<?,?> options)
- Extract the
OPTION_BUFFER_CAPACITY
from the options.
- Parameters:
options
- a map of options.
- Returns:
- the value associated with the
OPTION_BUFFER_CAPACITY
key in the options map. - Since:
- 2.6
doSave
protected void doSave(java.io.OutputStream outputStream,
java.util.Map<?,?> options)
throws java.io.IOException
- Description copied from class:
ResourceImpl
- Called to save the resource.
This implementation throws an exception;
clients must override it.
- Overrides:
doSave
in class ResourceImpl
- Parameters:
outputStream
- the streamoptions
- the save options.
- Throws:
java.io.IOException
doLoad
protected void doLoad(java.io.InputStream inputStream,
java.util.Map<?,?> options)
throws java.io.IOException
- Description copied from class:
ResourceImpl
- Called to load the resource.
This implementation throws an exception;
clients must override it.
- Overrides:
doLoad
in class ResourceImpl
- Parameters:
inputStream
- the streamoptions
- the load options.
- Throws:
java.io.IOException