private final String[] getTwoValue( final byte[] actionBS, final byte[] bs, final int offset, final int len) { final int firstValueIdx = offset + actionBS.length + JSCore.splitBS.length; final int secondSplitIdx = searchNextSplitIndex(bs, firstValueIdx); final String value1 = new String(bs, firstValueIdx, secondSplitIdx - firstValueIdx); final int secondValueIdx = secondSplitIdx + JSCore.splitBS.length; final String value2 = new String(bs, secondValueIdx, (len + offset) - secondValueIdx); final String[] out = {JSCore.decode(value1), JSCore.decode(value2)}; return out; }
private final String getOneValue( final byte[] actionBS, final byte[] bs, final int offset, final int len) { final int firstValueIdx = offset + actionBS.length + JSCore.splitBS.length; final String id = new String(bs, firstValueIdx, len + offset - firstValueIdx); return JSCore.decode(id); }
private final String[] getThreeValue( final byte[] actionBS, final byte[] bs, final int offset, final int len) { // try { // final String str = new String(bs, offset, len, IConstant.UTF_8); // } catch (final UnsupportedEncodingException e) { // ExceptionReporter.printStackTrace(e); // } final int firstValueIdx = offset + actionBS.length + JSCore.splitBS.length; final int secondSplitIdx = searchNextSplitIndex(bs, firstValueIdx); final String value1 = new String(bs, firstValueIdx, secondSplitIdx - firstValueIdx); final int secondValueIdx = secondSplitIdx + JSCore.splitBS.length; final int threeSplitIdx = searchNextSplitIndex(bs, secondValueIdx); final String value2 = new String(bs, secondValueIdx, threeSplitIdx - secondValueIdx); final int threeValueIdx = threeSplitIdx + JSCore.splitBS.length; final String value3 = new String(bs, threeValueIdx, (len + offset) - threeValueIdx); final String[] out = {JSCore.decode(value1), JSCore.decode(value2), JSCore.decode(value3)}; return out; }