Package jetbrains.mps.persistence
Class ByteArrayInputSource
- java.lang.Object
 - 
- jetbrains.mps.persistence.PersistenceUtil.StreamDataSourceBase
 - 
- jetbrains.mps.persistence.ByteArrayInputSource
 
 
 
- 
- All Implemented Interfaces:
 DataSource,StreamDataSource
public class ByteArrayInputSource extends PersistenceUtil.StreamDataSourceBase
Bare input source for models backed by plain byte array. Doesn't dispatch events (nor track listeners), doesn't manage timestamp. input stream could be open multiple times.- Since:
 - 3.4
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ByteArrayInputSource(byte[] input) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSourceTypegetType()Defines a data source type for this kind of data sources.InputStreamopenInputStream()- 
Methods inherited from class jetbrains.mps.persistence.PersistenceUtil.StreamDataSourceBase
addListener, getLocation, getTimestamp, isReadOnly, openOutputStream, removeListener 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
ByteArrayInputSource
public ByteArrayInputSource(@NotNull byte[] input)
 
 - 
 
- 
Method Detail
- 
openInputStream
public InputStream openInputStream()
- Specified by:
 openInputStreamin interfaceStreamDataSource- Overrides:
 openInputStreamin classPersistenceUtil.StreamDataSourceBase
 
- 
getType
@Nullable public DataSourceType getType()
Description copied from interface:DataSourceDefines a data source type for this kind of data sources. The data source type notion is strongly associated with the possibility to provideDataSourceFactoryandModelFactorycustom mappings. SeeDataSourceFactoryRuleServiceandModelFactoryServicefor the implementation details.- Returns:
 - the unique data source type for this instance of data source if the developer wants others to be able to change the default behavior of this data source (register with the same key) or if he desires to associate this data source with some specific model factory.
 
 
 - 
 
 -