Class TemplateReaderWriter
- java.lang.Object
-
- org.eclipse.text.templates.TemplateReaderWriter
-
- org.eclipse.jface.text.templates.persistence.TemplateReaderWriter
-
@Deprecated public class TemplateReaderWriter extends org.eclipse.text.templates.TemplateReaderWriter
Deprecated.SeeTemplateReaderWriterSerializes templates as character or byte stream and reads the same format back.Clients may instantiate this class, it is not intended to be subclassed.
- Since:
- 3.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Constructor Description TemplateReaderWriter()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TemplatePersistenceData[]read(InputStream stream, ResourceBundle bundle)Deprecated.Reads templates from a stream and adds them to the templates.TemplatePersistenceData[]read(Reader reader)Deprecated.Reads templates from a reader and returns them.TemplatePersistenceData[]read(Reader reader, ResourceBundle bundle)Deprecated.Reads templates from a stream and adds them to the templates.TemplatePersistenceDatareadSingle(Reader reader, String id)Deprecated.Reads the template with identifieridfrom a reader and returns it.voidsave(TemplatePersistenceData[] templates, OutputStream stream)Deprecated.voidsave(TemplatePersistenceData[] templates, Writer writer)Deprecated.
-
-
-
Method Detail
-
read
public TemplatePersistenceData[] read(Reader reader) throws IOException
Deprecated.Description copied from class:org.eclipse.text.templates.TemplateReaderWriterReads templates from a reader and returns them. The reader must present a serialized form as produced by thesavemethod.- Overrides:
readin classorg.eclipse.text.templates.TemplateReaderWriter- Parameters:
reader- the reader to read templates from- Returns:
- the read templates, encapsulated in instances of
TemplatePersistenceData - Throws:
IOException- if reading from the stream fails
-
readSingle
public TemplatePersistenceData readSingle(Reader reader, String id) throws IOException
Deprecated.Description copied from class:org.eclipse.text.templates.TemplateReaderWriterReads the template with identifieridfrom a reader and returns it. The reader must present a serialized form as produced by thesavemethod.- Overrides:
readSinglein classorg.eclipse.text.templates.TemplateReaderWriter- Parameters:
reader- the reader to read templates fromid- the id of the template to return- Returns:
- the read template, encapsulated in an instances of
TemplatePersistenceData - Throws:
IOException- if reading from the stream fails
-
read
public TemplatePersistenceData[] read(Reader reader, ResourceBundle bundle) throws IOException
Deprecated.Description copied from class:org.eclipse.text.templates.TemplateReaderWriterReads templates from a stream and adds them to the templates.- Overrides:
readin classorg.eclipse.text.templates.TemplateReaderWriter- Parameters:
reader- the reader to read templates frombundle- a resource bundle to use for translating the read templates, ornullif no translation should occur- Returns:
- the read templates, encapsulated in instances of
TemplatePersistenceData - Throws:
IOException- if reading from the stream fails
-
read
public TemplatePersistenceData[] read(InputStream stream, ResourceBundle bundle) throws IOException
Deprecated.Description copied from class:org.eclipse.text.templates.TemplateReaderWriterReads templates from a stream and adds them to the templates.- Overrides:
readin classorg.eclipse.text.templates.TemplateReaderWriter- Parameters:
stream- the byte stream to read templates frombundle- a resource bundle to use for translating the read templates, ornullif no translation should occur- Returns:
- the read templates, encapsulated in instances of
TemplatePersistenceData - Throws:
IOException- if reading from the stream fails
-
save
public void save(TemplatePersistenceData[] templates, OutputStream stream) throws IOException
Deprecated.- Throws:
IOException
-
save
public void save(TemplatePersistenceData[] templates, Writer writer) throws IOException
Deprecated.- Throws:
IOException
-
-