Example usage for java.security Key toString

List of usage examples for java.security Key toString

Introduction

In this page you can find the example usage for java.security Key toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:SuperPeer.java

@Override
public synchronized String getAddress(Key id) throws Exception {
    lg.log(Level.FINEST, "getAddress Entry.");
    PeerInfo fe = null;//www . j av  a2  s . c om
    Iterator<PeerInfo> it = peertable.iterator();
    while (it.hasNext()) {
        fe = it.next();
        lg.log(Level.FINER, "getAddress - Checking " + fe.getNodeId().toString() + " for match ...");
        if (fe.getNodeId().equals(id)) {
            lg.log(Level.FINER, "getAddress - match found.");
            lg.log(Level.FINEST, "getAddress Exit.");
            return fe.getIP();
        }
    }

    lg.log(Level.WARNING, "getAddress failed on " + id.toString() + ", returning null!");
    lg.log(Level.FINEST, "getAddress Entry.");
    return null;
}