Java Code Examples for java.util.Arrays.toString()

The following are Jave code examples for showing how to use toString() of the java.util.Arrays class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: rskj   File: Web3.java   View Source Code Vote up 7 votes
@Override
public String toString() {
    return "BlockResult{" +
            "number='" + number + '\'' +
            ", hash='" + hash + '\'' +
            ", parentHash='" + parentHash + '\'' +
            ", sha3Uncles='" + sha3Uncles + '\'' +
            ", logsBloom='" + logsBloom + '\'' +
            ", transactionsRoot='" + transactionsRoot + '\'' +
            ", stateRoot='" + stateRoot + '\'' +
            ", receiptsRoot='" + receiptsRoot + '\'' +
            ", miner='" + miner + '\'' +
            ", difficulty='" + difficulty + '\'' +
            ", totalDifficulty='" + totalDifficulty + '\'' +
            ", extraData='" + extraData + '\'' +
            ", size='" + size + '\'' +
            ", gasLimit='" + gasLimit + '\'' +
            ", minimumGasPrice='" + minimumGasPrice + '\'' +
            ", gasUsed='" + gasUsed + '\'' +
            ", timestamp='" + timestamp + '\'' +
            ", transactions=" + Arrays.toString(transactions) +
            ", uncles=" + Arrays.toString(uncles) +
            '}';
}
 
Example 2
Project: alfresco-core   File: AlfrescoRuntimeException.java   View Source Code Vote up 5 votes
/**
 * Resolves the message id to the localised string.
 * <p>
 * If a localised message can not be found then the message Id is
 * returned.
 * 
 * @param messageId     the message Id
 * @param params        message parameters
 * @return              the localised message (or the message id if none found)
 */
private static String resolveMessage(String messageId, Object[] params)
{
    String message = I18NUtil.getMessage(messageId, params);
    if (message == null)
    {
        // If a localized string cannot be found then return the messageId and the params
        message = messageId;
        if (params != null)
        {
            message += " - " + Arrays.toString(params);
        }
    }
    return buildErrorLogNumber(message);
}
 
Example 3
Project: TPlayer   File: Reflect.java   View Source Code Vote up 5 votes
/**
 * 智能调用 但是只调用类本身声明方法 按照优先级 匹配
 * <p>
 * 1.完全匹配
 * 2.形参 Object...
 * 3.名字相同 无参数
 *
 * @param name
 * @param args
 * @return
 * @throws ReflectException
 */
public Reflect callBest(String name, Object... args) throws ReflectException {
    Class<?>[] types = types(args);
    Class<?> type = type();

    Method bestMethod = null;
    int level = 0;
    for (Method method : type.getDeclaredMethods()) {
        if (isSimilarSignature(method, name, types)) {
            bestMethod = method;
            level = 2;
            break;
        }
        if (matchObjectMethod(method, name, types)) {
            bestMethod = method;
            level = 1;
            continue;
        }
        if (method.getName().equals(name) && method.getParameterTypes().length == 0 && level == 0) {
            bestMethod = method;
        }
    }
    if (bestMethod != null) {
        if (level == 0) {
            args = new Object[0];
        }
        if (level == 1) {
            Object[] args2 = {args};
            args = args2;
        }
        return on(bestMethod, object, args);
    } else {
        throw new ReflectException("no method found for " + name, new NoSuchMethodException("No best method " + name + " with params " + Arrays.toString(types)
                + " could be found on type " + type() + "."));
    }
}
 
Example 4
Project: CraftoDB   File: Index.java   View Source Code Vote up 5 votes
@Override
public String toString() {
	return "Index{" +
			"name='" + name + '\'' +
			", type=" + type +
			", columns=" + Arrays.toString(columns) +
			'}';
}
 
Example 5
Project: boohee_v5.6   File: DexPatchFile.java   View Source Code Vote up 5 votes
private void init() {
    byte[] magic = this.buffer.readByteArray(MAGIC.length);
    if (CompareUtils.uArrCompare(magic, MAGIC) != 0) {
        throw new IllegalStateException("bad dex patch file magic: " + Arrays.toString(magic));
    }
    this.version = this.buffer.readShort();
    if (CompareUtils.uCompare(this.version, (short) 2) != 0) {
        throw new IllegalStateException("bad dex patch file version: " + this.version + ", " +
                "expected: " + 2);
    }
    this.patchedDexSize = this.buffer.readInt();
    this.firstChunkOffset = this.buffer.readInt();
    this.patchedStringIdSectionOffset = this.buffer.readInt();
    this.patchedTypeIdSectionOffset = this.buffer.readInt();
    this.patchedProtoIdSectionOffset = this.buffer.readInt();
    this.patchedFieldIdSectionOffset = this.buffer.readInt();
    this.patchedMethodIdSectionOffset = this.buffer.readInt();
    this.patchedClassDefSectionOffset = this.buffer.readInt();
    this.patchedMapListSectionOffset = this.buffer.readInt();
    this.patchedTypeListSectionOffset = this.buffer.readInt();
    this.patchedAnnotationSetRefListSectionOffset = this.buffer.readInt();
    this.patchedAnnotationSetSectionOffset = this.buffer.readInt();
    this.patchedClassDataSectionOffset = this.buffer.readInt();
    this.patchedCodeSectionOffset = this.buffer.readInt();
    this.patchedStringDataSectionOffset = this.buffer.readInt();
    this.patchedDebugInfoSectionOffset = this.buffer.readInt();
    this.patchedAnnotationSectionOffset = this.buffer.readInt();
    this.patchedEncodedArraySectionOffset = this.buffer.readInt();
    this.patchedAnnotationsDirectorySectionOffset = this.buffer.readInt();
    this.oldDexSignature = this.buffer.readByteArray(20);
    this.buffer.position(this.firstChunkOffset);
}
 
Example 6
Project: util4j   File: HexStrBytes.java   View Source Code Vote up 5 votes
/**
 * 截取以文本开头的字节数据并以hexStringArray数组返回
 * @param data 目标字节数组
 * @param startHexStr  普通文本,默认以utf8形式
 * @return
 * @throws UnsupportedEncodingException
 */
public String[] subHexArray(byte[] data,String startStr) throws UnsupportedEncodingException
{
	if(data==null||data.length<=0)
	{
		System.out.println("data数据无效!");
		return null;
	}
	String[] result=null;
	//转换原数据
	String[] hexarray=toHexArray(data);
	String hexstr=Arrays.toString(hexarray);
	hexstr=StringUtils.substringBetween(hexstr, "[", "]").replaceAll("\\s", "");//原数据字符串去括号空格
	////转换匹配参数数据
	byte[] startArray=startStr.getBytes("utf-8");//转换为字节
	String[] startHex=toHexArray(startArray);//转换为hex字符数组
	String startHexStr=Arrays.toString(startHex);//转换为hex字符串
	startHexStr=StringUtils.substringBetween(startHexStr, "[", "]").replaceAll("\\s", "");//去括号空格
	String resultHex=StringUtils.substringAfter(hexstr, startHexStr);
	if(resultHex==null)
	{
		//System.out.println("注意:截取内容为空,无数据!");
		return null;
	}
	result=StringUtils.split(resultHex, ',');//重组为hexstr数组
	return result;
}
 
Example 7
Project: JkImageLoader   File: DiskLruCache.java   View Source Code Vote up 4 votes
private IOException invalidLengths(String[] strings) throws IOException {
    throw new IOException("unexpected journal line: " + Arrays.toString(strings));
}
 
Example 8
Project: reactive-pg-client   File: AuthenticationMD5Password.java   View Source Code Vote up 4 votes
@Override
public String toString() {
  return "AuthenticationMD5Password{" +
    "salt=" + Arrays.toString(salt) +
    '}';
}
 
Example 9
Project: app-ms   File: JaxRsPath.java   View Source Code Vote up 4 votes
@Override
public String toString() {

    return "JaxRsPath [consumes=" + Arrays.toString(consumes) + ", exact=" + exact + ", method=" + method + ", path=" + path + ", pathRegex=" + pathRegex + ", produces=" + Arrays.toString(produces) + "]";
}
 
Example 10
Project: PlusGram   File: DataSpec.java   View Source Code Vote up 4 votes
@Override
public String toString() {
  return "DataSpec[" + uri + ", " + Arrays.toString(postBody) + ", " + absoluteStreamPosition
      + ", "  + position + ", " + length + ", " + key + ", " + flags + "]";
}
 
Example 11
Project: holon-core   File: DefaultBeanProjection.java   View Source Code Vote up 4 votes
@Override
public String toString() {
	return "DefaultBeanProjection [beanClass=" + beanClass + ", selection=" + Arrays.toString(selection) + "]";
}
 
Example 12
Project: OperatieBRP   File: RequestExecute.java   View Source Code Vote up 4 votes
@Override
public String toString() {
    return "RequestExecute [requestId=" + getRequestId() + ", methodName=" + methodName + ", parameterClasses="
            + Arrays.toString(parameterClasses) + "]";
}
 
Example 13
Project: dsp4e   File: DebugProtocol.java   View Source Code Vote up 4 votes
@Override
public String toString() {
	return "Body ["
		+ "targets=" + Arrays.toString(targets)
	 + "]";
}
 
Example 14
Project: docker-network-veth   File: ShellCommand.java   View Source Code Vote up 4 votes
@Override
public String toString() {
    return "ShellCommand{" +
            "arguments=" + Arrays.toString(arguments) +
            '}';
}
 
Example 15
Project: oscm   File: UiDelegateStub.java   View Source Code Vote up 4 votes
@Override
public String toString() {
    return "ContainerDelegateStub [errors=" + errors + ", messageKey="
            + messageKey + ", messageParams="
            + Arrays.toString(messageParams) + "]";
}
 
Example 16
Project: holon-core   File: LocalizableMessage.java   View Source Code Vote up 4 votes
@Override
public String toString() {
	return "LocalizableMessage [messageCode=" + messageCode + ", message=" + message + ", messageArguments="
			+ Arrays.toString(messageArguments) + "]";
}
 
Example 17
Project: Companion-For-PUBG-Android   File: ConsumableList.java   View Source Code Vote up 4 votes
@Override
public String toString() {
    return "ConsumableList{" +
            Arrays.toString(toArray()) +
            "}";
}
 
Example 18
Project: HCFCore   File: MultiKey.java   View Source Code Vote up 2 votes
/**
 * Gets a debugging string version of the key.
 *
 * @return a debugging string
 */
@Override
public String toString() {
    return "MultiKey" + Arrays.toString(keys);
}
 
Example 19
Project: HCFCore   File: MultiKey.java   View Source Code Vote up 2 votes
/**
 * Gets a debugging string version of the key.
 *
 * @return a debugging string
 */
@Override
public String toString() {
    return "MultiKey" + Arrays.toString(keys);
}
 
Example 20
Project: EasyAndroid   File: Convert.java   View Source Code Vote up 2 votes
/**
 * value转换返回String
 *
 * @param value 目标值
 * @return String
 */
public static String toString(byte[] value)
{
    return Arrays.toString(value);
}