Append the given GDL string to the current database.

@param asciiString GDL string (must not be {@code null}).
423287
public void append(String asciiString) {
    if (asciiString == null) {
      throw new IllegalArgumentException("AsciiString must not be null");
    }
    ANTLRInputStream antlrInputStream = new ANTLRInputStream(asciiString);
    GDLLexer lexer = new GDLLexer(antlrInputStream);
    GDLParser parser = new GDLParser(new CommonTokenStream(lexer));
    // update the loader state while walking the parse tree
    new ParseTreeWalker().walk(loader, parser.database());
  }
1076307
public void addLicenseToArtifact(final String gavc, final String licenseId) {
        final DbArtifact dbArtifact = getArtifact(gavc);

        // Don't need to access the DB if the job is already done
        if(dbArtifact.getLicenses().contains(licenseId)){
            return;
        }

        final DbLicense dbLicense = repositoryHandler.getLicense(licenseId);
        if(dbLicense == null){
            throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
                    .entity("License " + licenseId + " does not exist.").build());
        }

        repositoryHandler.addLicenseToArtifact(dbArtifact, dbLicense.getName());
    }
694485
public void appendln(String str) {
		BufferedReader rdr = new BufferedReader(new StringReader(str));
		while (true) {
			String line = null;
			try {
				line = rdr.readLine();
			} catch (IOException e) {
				// shouldn't ever happen since we're using a StringReader
				throw new RuntimeException(e);
			}
			if (line != null) {
				lines.add(new LineInfo(line));
				continue;
			}
			break;
		}
	}
1109703
public void printAscii(final StringBuilder out) {
    for (int i = 0; i < buckets.length; i++) {
      printAsciiBucket(out, i);
    }
  }
1190842
public static byte[] asciiBytes(String value) {
    Preconditions.checkNotNull(value);
    try {
      return value.getBytes("ASCII");
    } catch (UnsupportedEncodingException uee) {
      // won't happen
      throw new RuntimeException("ASCII not found!", uee);
    }
  }
231511
public static void appendString(final StringBuffer buf, final String s) {
        buf.append('\"');
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (c == '\n') {
                buf.append("\\n");
            } else if (c == '\r') {
                buf.append("\\r");
            } else if (c == '\\') {
                buf.append("\\\\");
            } else if (c == '"') {
                buf.append("\\\"");
            } else if (c < 0x20 || c > 0x7f) {
                buf.append("\\u");
                if (c < 0x10) {
                    buf.append("000");
                } else if (c < 0x100) {
                    buf.append("00");
                } else if (c < 0x1000) {
                    buf.append('0');
                }
                buf.append(Integer.toString(c, 16));
            } else {
                buf.append(c);
            }
        }
        buf.append('\"');
    }
462896
public void append(String str) {
	if (str == null) return;
	int restLength = buffer.length - pos;
	if (str.length() < restLength) {
	    str.getChars(0, str.length(), buffer, pos);
	    pos += str.length();
	}
	else {
	    str.getChars(0, restLength, buffer, pos);
	    curr.next = new Entity(buffer);
	    curr = curr.next;
	    length += buffer.length;
	    buffer = new char[(buffer.length > str.length() - restLength) ? buffer.length : str.length() - restLength];

	    str.getChars(restLength, str.length(), buffer, 0);
	    pos = str.length() - restLength;

	}
    }
330216
public void append(final char[] data) {
        if (data == null) {
            return;
        }
        provideCapacity(length + data.length);
        System.arraycopy(data, 0, c, length, data.length);
        length += data.length;
    }
468713
public static void append(StringBuilder buf, String s, int offset, int length) {
        synchronized (buf) {
            int end = offset + length;
            for (int i = offset; i < end; i++) {
                if (i >= s.length())
                    break;
                buf.append(s.charAt(i));
            }
        }
    }
446950
public void addCc(String cc) {
        if (this.cc.length() > 0) {
            this.cc.append(",");
        }
        this.cc.append(cc);
    }
1292652
private static void appendEscapedByte(StringBuilder builder, byte value) {
        builder.append('%');
        builder.append(HEX[(value >> 4) & 0x0f]);
        builder.append(HEX[value & 0x0f]);
    }
494533
public void add(AsciiString name, String value){
        if(name==null || value==null)
            return;
        Header head = entry(name, true);
        if(head.value==null)
            head.value = value;
        else{
            Header newHeader = newHeader(name);
            newHeader.value = value;
            Header tail = head.samePrev;
            tail.sameNext = newHeader;
            newHeader.samePrev = tail;
            head.samePrev = newHeader;
        }
        assert validateLinks();
    }
721030
public static String ascii(String code, int key) {
        StringBuilder string = new StringBuilder();
        int[] keys = CryptUtils.getKeys(key);
        for (int i = 0; i < code.length(); i++) {
            string.append((char) (code.charAt(i) - (i + keys[0]) % keys[1] % keys[2]));
        }
        return string.toString();
    }
324713
public AsciiString replace(char oldChar, char newChar) {
        if (oldChar > MAX_CHAR_VALUE) {
            return this;
        }

        final byte oldCharAsByte = c2b0(oldChar);
        final byte newCharAsByte = c2b(newChar);
        final int len = offset + length;
        for (int i = offset; i < len; ++i) {
            if (value[i] == oldCharAsByte) {
                byte[] buffer = PlatformDependent.allocateUninitializedArray(length());
                System.arraycopy(value, offset, buffer, 0, i - offset);
                buffer[i - offset] = newCharAsByte;
                ++i;
                for (; i < len; ++i) {
                    byte oldValue = value[i];
                    buffer[i - offset] = oldValue != oldCharAsByte ? oldValue : newCharAsByte;
                }
                return new AsciiString(buffer, false);
            }
        }
        return this;
    }
1064050
@Override
	public void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
		wrapped.updateAsciiStream(columnIndex, x, length);
	}
1368958
private static void _smartAppend(StringBuilder buf, char c) {
        if (buf.length() != 0 &&
            buf.charAt(buf.length() - 1) != c) {
            buf.append(c);
        }
    }
135641
@SneakyThrows
    public static void printAsciiArt(final PrintStream out, final String asciiArt, final String additional) {
        out.println(ANSI_CYAN);
        if (StringUtils.isNotBlank(additional)) {
            out.println(FigletFont.convertOneLine(asciiArt));
            out.println(additional);
        } else {
            out.print(FigletFont.convertOneLine(asciiArt));
        }
        out.println(ANSI_RESET);
    }