/** * Returns a string representation of this <code>BinaryQValue</code> * instance. The string representation of a resource backed value is * the path of the underlying resource. If this instance is backed by an * in-memory buffer the generic object string representation of the byte * array will be used instead. * * @return A string representation of this <code>BinaryQValue</code> instance. */ @Override public String toString() { if (file != null) { // this instance is backed by a 'real' file return file.toString(); } else if (buffer != null) { // this instance is backed by an in-memory buffer return buffer.toString(); } else { return super.toString(); } }
/** * Returns a string representation of this <code>BinaryQValue</code> * instance. The string representation of a resource backed value is * the path of the underlying resource. If this instance is backed by an * in-memory buffer the generic object string representation of the byte * array will be used instead. * * @return A string representation of this <code>BinaryQValue</code> instance. */ @Override public String toString() { if (file != null) { // this instance is backed by a 'real' file return file.toString(); } else if (buffer != null) { // this instance is backed by an in-memory buffer return buffer.toString(); } else { return super.toString(); } }