@Test public void shouldTokenizeWithEventsContainingPartialDelimiterMatches() { String testInput = "ab$cdef$$$ghi$jkl$$$lmno$$pqrst$"; BufferedReader reader = new BufferedReader(new StringReader(testInput)); try { List<MantisServerSentEvent> result = CompressionUtils.tokenize(reader); assertEquals(result.size(), 3); assertEquals(result.get(0).getEventAsString(), "ab$cdef"); assertEquals(result.get(1).getEventAsString(), "ghi$jkl"); assertEquals(result.get(2).getEventAsString(), "lmno$$pqrst$"); } catch (IOException ex) { Assert.fail("Tokenization threw an IO exception that was unexpected"); } }
static List<MantisServerSentEvent> tokenize(BufferedReader br) throws IOException { return tokenize(br, MANTIS_SSE_DELIMITER); }
CompressionUtils { static List<MantisServerSentEvent> tokenize(BufferedReader br) throws IOException { return tokenize(br, MANTIS_SSE_DELIMITER); } }
CompressionUtils { static List<MantisServerSentEvent> tokenize(BufferedReader br) throws IOException { return tokenize(br, MANTIS_SSE_DELIMITER); }  }
CompressionUtils { static List<MantisServerSentEvent> tokenize(BufferedReader br) throws IOException { return tokenize(br, MANTIS_SSE_DELIMITER); }  static String compressAndBase64Encode(List<String> events, boolean useSnappy); static String compressAndBase64Encode(List<String> events, boolean useSnappy, byte[] delimiter); static String compressAndBase64Encode(List<String> events); static byte[] compressAndBase64EncodeBytes(List<List<byte[]>> nestedEvents, boolean useSnappy); static byte[] compressAndBase64EncodeBytes(List<List<byte[]>> nestedEvents, boolean useSnappy, byte[] delimiter); @Deprecated static byte[] compressAndBase64EncodeBytes(List<List<byte[]>> nestedEvents); static List<MantisServerSentEvent> decompressAndBase64Decode_old(String encodedString, boolean isCompressedBinary); static List<MantisServerSentEvent> decompressAndBase64Decode(String encodedString,
                                                                        boolean isCompressedBinary,
                                                                        boolean useSnappy); static List<MantisServerSentEvent> decompressAndBase64Decode(String encodedString,
                                                                        boolean isCompressedBinary,
                                                                        boolean useSnappy,
                                                                        String delimiter); @Deprecated static List<MantisServerSentEvent> decompressAndBase64Decode(String encodedString, boolean isCompressedBinary); static void main(String[] args); }
CompressionUtils { static List<MantisServerSentEvent> tokenize(BufferedReader br) throws IOException { return tokenize(br, MANTIS_SSE_DELIMITER); }  static String compressAndBase64Encode(List<String> events, boolean useSnappy); static String compressAndBase64Encode(List<String> events, boolean useSnappy, byte[] delimiter); static String compressAndBase64Encode(List<String> events); static byte[] compressAndBase64EncodeBytes(List<List<byte[]>> nestedEvents, boolean useSnappy); static byte[] compressAndBase64EncodeBytes(List<List<byte[]>> nestedEvents, boolean useSnappy, byte[] delimiter); @Deprecated static byte[] compressAndBase64EncodeBytes(List<List<byte[]>> nestedEvents); static List<MantisServerSentEvent> decompressAndBase64Decode_old(String encodedString, boolean isCompressedBinary); static List<MantisServerSentEvent> decompressAndBase64Decode(String encodedString,
                                                                        boolean isCompressedBinary,
                                                                        boolean useSnappy); static List<MantisServerSentEvent> decompressAndBase64Decode(String encodedString,
                                                                        boolean isCompressedBinary,
                                                                        boolean useSnappy,
                                                                        String delimiter); @Deprecated static List<MantisServerSentEvent> decompressAndBase64Decode(String encodedString, boolean isCompressedBinary); static void main(String[] args); static final String MANTIS_SSE_DELIMITER; static final byte[] MANTIS_SSE_DELIMITER_BINARY; }