Reads a custom dictionary into the database.
@param reader The reader from which the dictionary data will be read
@param name The name of the dictionary
973590
public void readDictionary(Reader reader, String name) {
        name = name.toLowerCase();
        logger.debug("Reading dictionary: ", name);
        if (!dictionaries.containsKey(name)) {
            try {
                Dictionary dictionary = Dictionary.unmarshal(reader);
                dictionaries.put(name, dictionary);
                logger.debug("  ... loaded and stored");
            } catch (Exception exception) {
                logger.error("Could not read dictionary: ", name);
                logger.debug(exception);
            }
        } else {
            logger.error("Dictionary already loaded: ", name);
        }
    }
1301535
public static final void setReader(String format, TreeReader reader) {
		String key = format.toLowerCase();
		readers.put(key, reader);
		if (JSON.equals(key)) {
			cachedJsonReader = reader;
		}
	}
538998
@Override
  public LatLng read(JsonReader reader) throws IOException {
    if (reader.peek() == JsonToken.NULL) {
      reader.nextNull();
      return null;
    }

    double lat = 0;
    double lng = 0;
    boolean hasLat = false;
    boolean hasLng = false;

    reader.beginObject();
    while (reader.hasNext()) {
      String name = reader.nextName();
      if ("lat".equals(name) || "latitude".equals(name)) {
        lat = reader.nextDouble();
        hasLat = true;
      } else if ("lng".equals(name) || "longitude".equals(name)) {
        lng = reader.nextDouble();
        hasLng = true;
      }
    }
    reader.endObject();

    if (hasLat && hasLng) {
      return new LatLng(lat, lng);
    } else {
      return null;
    }
  }
610263
public void add(Reader reader) throws IOException
    {
        BufferedReader buffered = new BufferedReader(reader);
        String line = buffered.readLine();
        while (line != null)
        {
            String[] split = line.split(delimiter);
            if (split.length != 2)
                throw new IllegalArgumentException();
            add(split[0].trim(), MentionType.getType(split[1].trim()));
            line = buffered.readLine();
        }
        // System.out.println("Size is now " + entities.size());
    }
191879
public static XMLStreamException duplicateAttribute(final XMLExtendedStreamReader reader, final String name) {
        final XMLStreamException ex = ControllerLogger.ROOT_LOGGER.duplicateAttribute(name, reader.getLocation());

        return new XMLStreamValidationException(ex.getMessage(),
                                                ValidationError.from(ex, ErrorType.DUPLICATE_ATTRIBUTE)
                                                        .element(reader.getName())
                                                        .attribute(new QName(name)),
                                                ex);
    }
408725
def Deserialize(self, reader):
        
        self.Type = reader.ReadByte()
        self.Hashes = reader.ReadHashes()
419444
public void readConfig(Reader reader) throws IOException {
		try {
			XMLStreamReader xr = XMLInputFactory.newInstance().createXMLStreamReader(reader);
			try {
				while (!xr.isStartElement()) {
					xr.next();
				}
				processStartElement(xr, "simon-configuration");
				while (true) {
					if (isStartTag(xr, "callback")) {
						manager.callback().addCallback(processCallback(xr));
					} else if (isStartTag(xr, "filter-callback")) {
						manager.callback().addCallback(processFilterCallback(xr));
					} else if (isStartTag(xr, "simon")) {
						processSimon(xr);
					} else {
						break;
					}
				}
				assertEndTag(xr, "simon-configuration");
			} finally {
				xr.close();
			}
		} catch (XMLStreamException e) {
			manager.callback().onManagerWarning(null, e);
		} catch (SimonException e) {
			manager.callback().onManagerWarning(e.getMessage(), e);
		}
	}
1277499
def create_reader(self, name, *args, **kwargs):
        """"""
        self._check_format(name)
        return self._formats[name]['reader'](*args, **kwargs)
199644
public static Properties loadProperties(Reader reader) {
        Properties prop = new Properties();
        try {
            prop.load(reader);
        } catch (IOException e) {
            throw E.ioException(e);
        } finally {
            IO.close(reader);
        }
        return prop;
    }
73117
public void readExternal(PofReader reader)
            throws IOException {
        super.readExternal(reader);
        setBinaryValue("newValue", reader.readBinary(10));
        fAllowInsert = reader.readBoolean(11);
        fReturn = reader.readBoolean(12);
    }
927378
public void addCustomDictionary(String name, List values) throws JSONException {
		logger.debug("Adding custom Dictionary [" + name + "] = (list)");
		put(name, values, payload, false);
	}
133284
@Override
    public void readExternal(PofReader reader) throws IOException {
        factory  = (Factory<List<E>>) reader.readObject(0);
        delegate = factory.create();
        reader.readCollection(1, delegate);
    }
1321346
public int read(final Reader reader) throws IOException {
        final int c = reader.read(cbuf);
        if (c > 0) {
            addData(cbuf, 0, c);
        }
        return c;
    }
1198653
public void readValue() {

        if (defValue == null) {
            value = reader.readValue(name);
        } else {
            value = reader.readValue(name, defValue);
        }

        if (valueInterceptor != null) {
            value = valueInterceptor.onValueRead(value);
        }
    }
1194136
public void load(Reader in) {
		try {
			doLoad(in);
		} catch (Exception e) {
			throw Exceptions.propagate(e);
		}
	}
222951
public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException {
		List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>();
		while (true) {
			DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader);
			if (config == null) {
				break;
			}
			list.add(config);
		}
		return list;
	}
324640
@Override
    public void readExternal(PofReader reader)
            throws IOException {
        name = reader.readString(0);
        mutator = reader.readBoolean(1);
        args = reader.readObjectArray(2, new Object[0]);
    }