BinaryValue.java revision e1cd6c2bc4addf80537e31f929118ac8f908ea63
b87033953be26b0dc7dead8febd499b666a54126Peter Major * CDDL HEADER START
b87033953be26b0dc7dead8febd499b666a54126Peter Major * The contents of this file are subject to the terms of the
b87033953be26b0dc7dead8febd499b666a54126Peter Major * Common Development and Distribution License, Version 1.0 only
b87033953be26b0dc7dead8febd499b666a54126Peter Major * (the "License"). You may not use this file except in compliance
b87033953be26b0dc7dead8febd499b666a54126Peter Major * with the License.
b87033953be26b0dc7dead8febd499b666a54126Peter Major * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
b87033953be26b0dc7dead8febd499b666a54126Peter Major * or http://forgerock.org/license/CDDLv1.0.html.
b87033953be26b0dc7dead8febd499b666a54126Peter Major * See the License for the specific language governing permissions
b87033953be26b0dc7dead8febd499b666a54126Peter Major * and limitations under the License.
b87033953be26b0dc7dead8febd499b666a54126Peter Major * When distributing Covered Code, include this CDDL HEADER in each
b87033953be26b0dc7dead8febd499b666a54126Peter Major * file and include the License file at legal-notices/CDDLv1_0.txt.
b87033953be26b0dc7dead8febd499b666a54126Peter Major * If applicable, add the following below this CDDL HEADER, with the
b87033953be26b0dc7dead8febd499b666a54126Peter Major * fields enclosed by brackets "[]" replaced with your own identifying
b87033953be26b0dc7dead8febd499b666a54126Peter Major * information:
b87033953be26b0dc7dead8febd499b666a54126Peter Major * Portions Copyright [yyyy] [name of copyright owner]
b87033953be26b0dc7dead8febd499b666a54126Peter Major * CDDL HEADER END
b87033953be26b0dc7dead8febd499b666a54126Peter Major * Copyright 2008-2009 Sun Microsystems, Inc.
b87033953be26b0dc7dead8febd499b666a54126Peter Major * Portions Copyright 2015 ForgeRock AS
b87033953be26b0dc7dead8febd499b666a54126Peter Majorpackage org.opends.guitools.controlpanel.datamodel;
b87033953be26b0dc7dead8febd499b666a54126Peter Major * Class used to represent Binary Values. This is required in particular
b87033953be26b0dc7dead8febd499b666a54126Peter Major * when the user wants to use the value in a file. To be able to reflect
b87033953be26b0dc7dead8febd499b666a54126Peter Major * this this object is used: it contains the binary itself, the base 64
b87033953be26b0dc7dead8febd499b666a54126Peter Major * representation and the file that has been used.
public class BinaryValue
private byte[] bytes;
private int hashCode;
public enum Type
private BinaryValue()
return value;
return value;
return value;
return base64;
return bytes;
return type;
return file;
if (o instanceof BinaryValue)
boolean equals = true;
return equals;
throw new RuntimeException(
public int hashCode()
return hashCode;