Codota Logo
org.crosswire.common.util
Code IndexAdd Codota to your IDE (free)

How to use org.crosswire.common.util

Best Java code snippets using org.crosswire.common.util (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: crosswire/jsword

/**
 * Get the unmodifiable set of keys of the first section.
 * The set has insertion order.
 * 
 * @return the keys of the first section
 */
public Collection<String> getKeys() {
  IniSection section = getSection();
  return section == null ? null : section.getKeys();
}
origin: crosswire/jsword

/**
 * Get the value for the key specified by the index for the first section.
 * 
 * @param key the key
 * @param index the index
 * @return the value at the specified index
 * @throws ArrayIndexOutOfBoundsException when the index is out of bounds
 */
public String getValue(String key, int index) {
  IniSection section = getSection();
  return section == null ? null : section.get(key, index);
}
origin: crosswire/jsword

/**
 * Get the first value for the key specified by the index and the section.
 * 
 * @param sectionName the name of the section
 * @param key the key for the section
 * @return the value at the specified index
 * @throws ArrayIndexOutOfBoundsException when the index is out of bounds
 */
public String getValue(String sectionName, String key) {
  IniSection section = doGetSection(sectionName);
  return section == null ? null : section.get(key, 0);
}
origin: crosswire/jsword

/**
 * Get a list of the supported translations
 */
private void loadSupportedTranslations() {
  if (translations == null) {
    try {
      URL index = ResourceUtil.getResource(Translations.class, "translations.txt");
      translations = NetUtil.listByIndexFile(NetUtil.toURI(index));
    } catch (IOException ex) {
      translations = new String[0];
    }
  }
}
origin: crosswire/jsword

/**
 * Creates a privileged class loader that finds resources for the calling
 * class that may not be in the class' package. Use this only within classes
 * that are directly looking up their resources.
 * 
 * @return the CrossWire Class Loader
 */
public static CWClassLoader instance() {
  Class<? extends Object> resourceOwner = CallContext.getCallingClass();
  return instance(resourceOwner);
}
origin: crosswire/jsword

  @Override
  public URI getUserAreaFolder(String hiddenFolderName, String visibleFolderName) {
    return NetUtil.lengthenURI(getUserArea(), visibleFolderName);
  }
},
origin: crosswire/jsword

  @Override
  public URI getUserAreaFolder(String hiddenFolderName, String visibleFolderName) {
    return NetUtil.lengthenURI(getUserArea(), visibleFolderName);
  }
},
origin: crosswire/jsword

  @Override
  public URI getUserAreaFolder(String hiddenFolderName, String visibleFolderName) {
    return NetUtil.lengthenURI(getUserArea(), hiddenFolderName);
  }
};
origin: crosswire/jsword

/**
 * Add a value for the key. Duplicate values are not allowed.
 *
 * @param key the key for the section
 * @param value the value for the key
 * @return whether the value was added or is already present.
 */
public boolean addValue(String key, String value) {
  IniSection section = getSection();
  return section == null || section.add(key, value);
}
origin: crosswire/jsword

/**
 * Get the number of values for a key in the first section
 * 
 * @param key the key
 * @return the number of values for a key in the first section
 */
public int getValueSize(String key) {
  IniSection section = getSection();
  return section == null ? 0 : section.size(key);
}
origin: crosswire/jsword

/**
 * List all the strings specified by the index file passed in. To be
 * acceptable it must be a non-0 length string, not commented with #, and
 * not the index file itself.
 * 
 * @param index the URI to list
 * @return the list.
 * @throws IOException a problem with I/O happened
 */
public static String[] listByIndexFile(URI index) throws IOException {
  return listByIndexFile(index, new DefaultURIFilter());
}
origin: crosswire/jsword

/**
 * Get the values of a key of the first section.
 * The collection has insertion order.
 * Note many keys only have one value.
 * A key that has no values returns null.
 * 
 * @param key the key
 * @return the keyed values or null if the key doesn't exist
 */
public Collection<String> getValues(String key) {
  IniSection section = getSection();
  return section == null ? null : section.getValues(key);
}
origin: crosswire/jsword

/**
 * Replace a value for a key.
 * A null for key or value is not allowed.
 * An empty string for a key is not allowed.
 *
 * @param key the key for the section
 * @param value the value for the key
 * @return {@code true} if the element was added or already was present
 */
public boolean replaceValue(String key, String value) {
  IniSection section = getSection();
  return section == null || section.replace(key, value);
}
origin: crosswire/jsword

/**
 * Get and load a properties file from the writable area or if that fails
 * from the classpath (where a default ought to be stored)
 * 
 * @param subject
 *            The name of the desired resource (without any extension)
 * @return The found and loaded properties file
 * @throws IOException
 *             if the resource can not be loaded
 */
public static PropertyMap getProperties(String subject) throws IOException {
  return getProperties(CallContext.getCallingClass(), subject);
}
origin: crosswire/jsword

/**
 * Generic resource URL fetcher. One way or the other we'll find it! Either
 * as a relative or an absolute reference.
 * 
 * @param search
 *            The name of the resource (without a leading /) to find
 * @return The requested resource
 * @throws MissingResourceException
 *             if the resource can not be found
 */
public static URL getResource(String search) throws MissingResourceException {
  return getResource(CallContext.getCallingClass(), search);
}
origin: crosswire/jsword

public int getValueSize(String sectionName, String key) {
  IniSection section = doGetSection(sectionName);
  return section == null ? 0 : section.size(key);
}
origin: crosswire/jsword

@Override
public URI getUserArea() {
  return NetUtil.lengthenURI(getUserHome(), MAC_USER_DATA_AREA);
}
origin: crosswire/jsword

@Override
public URI getUserArea() {
  return NetUtil.lengthenURI(getUserHome(), WIN32_USER_DATA_AREA);
}
origin: crosswire/jsword

/**
 * Get the first value for the key in the first section.
 * 
 * @param key the key
 * @return the value at the specified index
 * @throws ArrayIndexOutOfBoundsException when the index is out of bounds
 */
public String getValue(String key) {
  IniSection section = getSection();
  return section == null ? null : section.get(key);
}
origin: crosswire/jsword

/**
 * Get the value for the key specified by the index and the section.
 * 
 * @param sectionName the name of the section
 * @param key the key for the section
 * @param index the index in the list of values
 * @return the value at the specified index
 * @throws ArrayIndexOutOfBoundsException when the index is out of bounds
 */
public String getValue(String sectionName, String key, int index) {
  IniSection section = doGetSection(sectionName);
  return section == null ? null : section.get(key, index);
}
org.crosswire.common.util

Most used classes

  • Language
  • CWProject
  • IOUtil
  • NetUtil
  • Reporter
  • Version,
  • WebResource,
  • CWClassLoader$PrivilegedLoader,
  • CWClassLoader,
  • CallContext,
  • ChainLink,
  • ClassUtil,
  • CollectionUtil,
  • Convert,
  • Countries,
  • DefaultURIFilter,
  • FileUtil,
  • Filter,
  • Histogram$Counter
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now