@Override
public OutputStream openOutForUpdate(@Nonnull final String id) throws NotFoundException, FileNotFoundException {
byte[] stored = serialized.get(id);
if (stored == null) {
throw new NotFoundException(id);
}
return new ByteArrayOutputStream() {
@Override
public void close() throws IOException {