org.scijava.text
Interface TextService
- All Superinterfaces:
- Comparable<Prioritized>, Contextual, Disposable, HandlerService<File,TextFormat>, HasPluginInfo, Prioritized, PTService<TextFormat>, RichPlugin, SciJavaPlugin, SciJavaService, Service, SingletonService<TextFormat>, Typed<File>, TypedService<File,TextFormat>
- All Known Implementing Classes:
- DefaultTextService
public interface TextService
- extends HandlerService<File,TextFormat>, SciJavaService
Interface for service that works with text formats.
- Author:
- Curtis Rueden
open
String open(File file)
throws IOException
- Reads the data from the given file into a string.
- Throws:
IOException
asHTML
String asHTML(File file)
throws IOException
- Expresses the given text string as HTML.
- Throws:
IOException
getHandler
TextFormat getHandler(File file)
- Gets the text format which best handles the given file.
- Specified by:
getHandler
in interface HandlerService<File,TextFormat>
getInstances
List<TextFormat> getInstances()
- Gets the list of available text formats.
- Specified by:
getInstances
in interface HandlerService<File,TextFormat>
- Specified by:
getInstances
in interface SingletonService<TextFormat>
supports
boolean supports(File file)
- Gets whether the given file contains text data in a supported format.
- Specified by:
supports
in interface HandlerService<File,TextFormat>
- Specified by:
supports
in interface Typed<File>
Copyright © 2009–2015 SciJava. All rights reserved.