UnknownSPTypedLiteralImpl(ByteBuffer data) { super(TYPE_ID, null); // Split the buffer into the datatype and lexical form fields String string = CHARSET.decode(data).toString(); int delimiter = string.indexOf('\t'); if (delimiter == -1) { throw new RuntimeException("Corrupt string pool entry (no delimiter)"); } try { // Initialize instance fields this.lexicalForm = string.substring(delimiter + 1, string.length()); this.typeURI = new URI(string.substring(0, delimiter)); } catch (URISyntaxException e) { throw new RuntimeException("Corrupt string pool entry", e); } }
public ByteBuffer getData() { assert typeURI.toString().indexOf('\t') == -1 : "Datatype URI contains tab: " + typeURI; return CHARSET.encode(typeURI + "\t" + lexicalForm); }