public CharSequenceToUTF8 append(CharSequence charSeq) { append(charSeq, 0, charSeq.length()); return this; }
public CharSequenceToUTF8 append(CharSequence charSeq) { append(charSeq, 0, charSeq.length()); return this; }
public CharSequenceToUTF8 append(CharSequence charSeq) { append(charSeq, 0, charSeq.length()); return this; }
private List<PrivateTopic> privateTopicsFromProducer(String source) { List<PrivateTopic> localSourceTopics = null; byte[] bytes = CharSequenceToUTF8Local.get().convert(source).append(" ").asBytes(); int sourceId = (int)TrieParserReader.query(TrieParserReaderLocal.get(), privateTopicSource, bytes, 0, bytes.length, Integer.MAX_VALUE); if (sourceId<0) { localSourceTopics = new ArrayList<PrivateTopic>(); privateTopicSource.setValue(bytes, sourceId = privateSourceTopics.size()); privateSourceTopics.add(localSourceTopics); } else { localSourceTopics = privateSourceTopics.get(sourceId); } return localSourceTopics; }
private List<PrivateTopic> privateTopicsFromConsumer(String target) { List<PrivateTopic> localTargetTopics = null; byte[] tbytes = CharSequenceToUTF8Local.get().convert(target).append(" ").asBytes(); int targetId = (int)TrieParserReader.query(TrieParserReaderLocal.get(), privateTopicTarget, tbytes, 0, tbytes.length, Integer.MAX_VALUE); if (targetId<0) { localTargetTopics = new ArrayList<PrivateTopic>(); //logger.info("record target '{}'",target); privateTopicTarget.setValue(tbytes, targetId = privateTargetTopics.size()); privateTargetTopics.add(localTargetTopics); } else { localTargetTopics = privateTargetTopics.get(targetId); } return localTargetTopics; }
public List<PrivateTopic> getPrivateTopicsFromTarget(String target) { byte[] bytes = CharSequenceToUTF8Local.get().convert(target).append(" ").asBytes(); int targetId = (int)TrieParserReader.query(TrieParserReaderLocal.get(), privateTopicTarget, bytes, 0, bytes.length, Integer.MAX_VALUE); List<PrivateTopic> result = (targetId<0) ? Collections.EMPTY_LIST: privateTargetTopics.get(targetId); return result; }
public List<PrivateTopic> getPrivateTopicsFromSource(String source) { byte[] bytes = CharSequenceToUTF8Local.get().convert(source).append(" ").asBytes(); int sourceId = (int)TrieParserReader.query(TrieParserReaderLocal.get(), privateTopicSource, bytes, 0, bytes.length, Integer.MAX_VALUE); List<PrivateTopic> result = (sourceId<0) ? Collections.EMPTY_LIST : privateSourceTopics.get(sourceId); return result; }
/** * * @param username used for basic authorization * @param password used for basic authorization */ public BasicAuthorization(String username, String password) { backing = CharSequenceToUTF8Local.get() .convert(username) .append(":") .convert(password).asBytes(); }
private void parseExtractionPath(String extractionPath) { JSONExtractorActive running = this; TrieParserReader trieParserReader = TrieParserReaderLocal.get(); CharSequenceToUTF8Local.get() .convert(extractionPath) .append(".") .parseSetup(trieParserReader); int token = 0; while ((token = (int)trieParserReader.parseNext(parser)) != -1) { switch(token) { case keyToken: path.add(TrieParserReader.capturedFieldBytesAsUTF8(trieParserReader, 0, new StringBuilder())); break; case dotToken: break; case arrayToken: path.add("[]"); break; } } }
private void parseExtractionPath(String extractionPath) { JSONExtractorActive running = this; TrieParserReader trieParserReader = TrieParserReaderLocal.get(); CharSequenceToUTF8Local.get() .convert(extractionPath) .append(".") .parseSetup(trieParserReader); int token = 0; while ((token = (int)trieParserReader.parseNext(parser)) != -1) { switch(token) { case keyToken: path.add(TrieParserReader.capturedFieldBytesAsUTF8(trieParserReader, 0, new StringBuilder())); break; case dotToken: break; case arrayToken: path.add("[]"); break; } } }
private void parseExtractionPath(String extractionPath) { JSONExtractorActive running = this; TrieParserReader trieParserReader = TrieParserReaderLocal.get(); CharSequenceToUTF8Local.get() .convert(extractionPath) .append(".") .parseSetup(trieParserReader); int token = 0; while ((token = (int)trieParserReader.parseNext(parser)) != -1) { switch(token) { case keyToken: path.add(TrieParserReader.capturedFieldBytesAsUTF8(trieParserReader, 0, new StringBuilder())); break; case dotToken: break; case arrayToken: path.add("[]"); break; } } }
byte[] bytes = CharSequenceToUTF8Local.get().convert(source).append(" ").asBytes(); int sourceId = (int)TrieParserReader.query(TrieParserReaderLocal.get(), privateTopicSource, bytes, 0, bytes.length, Integer.MAX_VALUE); if (sourceId<0) { byte[] tbytes = CharSequenceToUTF8Local.get().convert(targets[t]).append(" ").asBytes(); int targetId = (int)TrieParserReader.query(TrieParserReaderLocal.get(), privateTopicTarget, tbytes, 0, tbytes.length, Integer.MAX_VALUE); if (targetId<0) {