org.marketcetera.util.auth
Class HolderCharArray

java.lang.Object
  extended by org.marketcetera.util.auth.Holder<char[]>
      extended by org.marketcetera.util.auth.HolderCharArray

public class HolderCharArray
extends Holder<char[]>

A holder of a character array.

Since:
0.5.0
Version:
$Id: HolderCharArray.java 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com

Constructor Summary
HolderCharArray()
          Constructor mirroring superclass constructor.
HolderCharArray(I18NBoundMessage message)
          Constructor mirroring superclass constructor.
 
Method Summary
 void clear()
          Clears the receiver's data by first overwriting all prior characters with the nul ('\0') character (if the receiver had non-null data), and then setting the data to null.
 String getValueAsString()
          Returns the receiver's data as a string.
 void setValue(char[] value)
          Sets the receiver's data to the given value, after clearing the previous data via clear().
 
Methods inherited from class org.marketcetera.util.auth.Holder
getMessage, getValue, isSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HolderCharArray

public HolderCharArray(I18NBoundMessage message)
Constructor mirroring superclass constructor.

See Also:
Holder.Holder(I18NBoundMessage)

HolderCharArray

public HolderCharArray()
Constructor mirroring superclass constructor.

See Also:
Holder.Holder()
Method Detail

setValue

public void setValue(char[] value)
Sets the receiver's data to the given value, after clearing the previous data via clear().

Overrides:
setValue in class Holder<char[]>
Parameters:
value - The value, which may be null to unset the receiver's data.

getValueAsString

public String getValueAsString()
Returns the receiver's data as a string. This method should not be called if it is important to ensure that the holder data (such as a password) can be completely removed from memory using clear(); this is because the string created and returned by this method cannot be zeroed out.

Returns:
The data, which is null if the receiver's data is not set.

clear

public void clear()
Clears the receiver's data by first overwriting all prior characters with the nul ('\0') character (if the receiver had non-null data), and then setting the data to null.



Copyright © 2012. All Rights Reserved.