internal String decodeAllCodes(StringBuilder buff, int initialPosition) { int currentPosition = initialPosition; String remaining = null; do { DecodedInformation info = this.decodeGeneralPurposeField(currentPosition, remaining); String parsedFields = FieldParser.parseFieldsInGeneralPurpose(info.getNewString()); if (parsedFields != null) { buff.Append(parsedFields); } if (info.isRemaining()) { remaining = info.getRemainingValue().ToString(); } else { remaining = null; } if (currentPosition == info.NewPosition) {// No step forward! break; } currentPosition = info.NewPosition; } while (true); return(buff.ToString()); }
internal DecodedInformation decodeGeneralPurposeField(int pos, String remaining) { this.buffer.Length = 0; if (remaining != null) { this.buffer.Append(remaining); } this.current.setPosition(pos); DecodedInformation lastDecoded = parseBlocks(); if (lastDecoded != null && lastDecoded.isRemaining()) { return(new DecodedInformation(this.current.getPosition(), this.buffer.ToString(), lastDecoded.getRemainingValue())); } return(new DecodedInformation(this.current.getPosition(), this.buffer.ToString())); }