private int readLength() throws StreamCorruptedException {
		StringBuffer lenStr = new StringBuffer();
		while (input.remaining() > 0) {
			char ch = input.get();
			if (ch == ':') {
				//indexPlus(1);
				break;
			} else {
				lenStr.append(ch);
			}
		}
		int arrayLen = 0;
		try {
			arrayLen = Integer.valueOf(lenStr.toString());
		} catch (Throwable e) {
			throw new StreamCorruptedException("Integer of length failed to serialize");
		}

		return arrayLen;
	}