public class DefaultParserWriterPool extends Object implements ParserWriterPool
ParserWriterPool implementation that uses a HashMap
(not thread safe, but the pool should not be changed after initialisation,
therefore it should not be a problem, because multiple threads can read at the same time
without getting in troubles).| Constructor and Description |
|---|
DefaultParserWriterPool() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String mimeType,
ParserWriter<?> parser)
Adds one for the given mime type.
|
ParserWriter<?> |
get(String mimeType)
Get the
ParserWriter for the given mime type |
void |
remove(String mimeType)
Remove a the
ParserWriter for the given mime type. |
public void add(String mimeType, ParserWriter<?> parser)
add in interface ParserWriterPoolmimeType - parser - public ParserWriter<?> get(String mimeType)
ParserWriter for the given mime typeget in interface ParserWriterPoolmimeType - public void remove(String mimeType)
ParserWriter for the given mime type.
Will do nothing if no ParserWriter is registered
for the given mimeTyperemove in interface ParserWriterPoolmimeType - Copyright © 2015 Hannes Dorfmann. All rights reserved.