Class BitcoinConfFile

java.lang.Object
org.consensusj.bitcoin.jsonrpc.bitcoind.BitcoinConfFile

public class BitcoinConfFile extends Object
Utility class with (extremely limited) parsing of bitcoin.conf

Currently focused on just getting connection info

Currently ignores `[Sections]`.

  • Constructor Details

  • Method Details

    • readDefaultConfig

      public static BitcoinConf readDefaultConfig()
    • read

      public BitcoinConf read() throws IOException
      Read a `bitcoin.conf` file
      Returns:
      The configuration object
      Throws:
      IOException
    • readWithFallback

      Try to read `.conf` file, fallback to defaults on error If any exception occurs we return default values TODO: maybe we should only return defaults on fileNotFound or accessDenied, etc.
      Returns:
      Configuration read or defaults if read error