i2p.susi.dns

## Class BlacklistBean

- java.lang.Object
- - i2p.susi.dns.BaseBean
  - - i2p.susi.dns.BlacklistBean

-     public class BlacklistBean
      extends BaseBean

  Bean for managing address book blacklist entries. Supports hostnames, b32, and b64 addresses.

- - ### Field Summary

    - ### Fields inherited from class i2p.susi.dns.BaseBean

      `_context, action, lastSerial, method, PROP_PW_ENABLE, properties, serial`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlacklistBean()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `addEntries(List<String> entries)` Add entries to the blacklist
    `String` | `getContent()` Get the current blacklist content
    `String` | `getFileName()` Get the blacklist file path
    `String` | `getMessages()` Get status messages for the UI
    `boolean` | `isB32Blacklisted(String b32)` Check if a b32 address is blacklisted (exact match or hostname match)
    `boolean` | `isB64Blacklisted(String b64)` Check if a b64 address is blacklisted (exact match or hostname/b32 match)
    `boolean` | `isBlacklisted(String address)` Check if an address is blacklisted
    `boolean` | `isBlacklistedByAnyForm(String address)` Enhanced blacklist check that tries hostname, b32, and b64 variations
    `boolean` | `isHostnameBlacklisted(String hostname)` Check if a hostname is blacklisted (exact match)
    `void` | `setContent(String content)` Set the blacklist content

    - ### Methods inherited from class i2p.susi.dns.BaseBean

      `_t, _t, _t, addressbookDir, configFile, debug, getAction, getSerial, getTheme, getThemeName, getThemes, isOverrideCssActive, loadConfig, ngettext, reload, setAction, setSerial, storeMethod, useSoraFont, warn`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BlacklistBean

          public BlacklistBean()

  - ### Method Detail

    - #### addEntries

          public int addEntries(List<String> entries)

      Add entries to the blacklist
      Parameters:
        `entries` - List of hostnames or addresses to add to the blacklist
      Returns:
        Number of entries successfully added

    - #### getContent

          public String getContent()

      Get the current blacklist content
      Returns:
        the blacklist content, or empty string if not loaded

    - #### getFileName

          public String getFileName()

      Get the blacklist file path
      Returns:
        the absolute path to the blacklist file

    - #### getMessages

          public String getMessages()

      Get status messages for the UI
      Returns:
        HTML formatted status message

    - #### isB32Blacklisted

          public boolean isB32Blacklisted(String b32)

      Check if a b32 address is blacklisted (exact match or hostname match)
      Parameters:
        `b32` - the b32 address to check
      Returns:
        true if the b32 address or its resolved hostname is in the blacklist, false otherwise

    - #### isB64Blacklisted

          public boolean isB64Blacklisted(String b64)

      Check if a b64 address is blacklisted (exact match or hostname/b32 match)
      Parameters:
        `b64` - the b64 address to check
      Returns:
        true if the b64 address or its resolved names are in the blacklist, false otherwise

    - #### isBlacklisted

          public boolean isBlacklisted(String address)

      Check if an address is blacklisted
      Parameters:
        `address` - the address to check
      Returns:
        true if the address is in the blacklist, false otherwise

    - #### isBlacklistedByAnyForm

          public boolean isBlacklistedByAnyForm(String address)

      Enhanced blacklist check that tries hostname, b32, and b64 variations
      Parameters:
        `address` - the address to check in any form
      Returns:
        true if the address is found in the blacklist in any form, false otherwise

    - #### isHostnameBlacklisted

          public boolean isHostnameBlacklisted(String hostname)

      Check if a hostname is blacklisted (exact match)
      Parameters:
        `hostname` - the hostname to check
      Returns:
        true if the hostname is in the blacklist, false otherwise

    - #### setContent

          public void setContent(String content)

      Set the blacklist content
      Parameters:
        `content` - the new blacklist content