target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testReadThrowsRuntimeException() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath", "testFSDMsgBaseSchema"); InputStream is = new ByteArrayInputStream(new byte[2]); InputStreamReader r = new InputStreamReader(is); try { fSDMsg.read(r, 100, "3Ch", "Ch"); fail("Expected RuntimeException...
protected String read (InputStreamReader r, int len, String type, String separator) throws IOException { StringBuilder sb = new StringBuilder(); char[] c = new char[1]; boolean expectSeparator = isSeparated(separator); boolean separated = expectSeparator; char separatorChar= expectSeparator ? getSeparator(separator) : ...
FSDMsg implements Loggeable, Cloneable { protected String read (InputStreamReader r, int len, String type, String separator) throws IOException { StringBuilder sb = new StringBuilder(); char[] c = new char[1]; boolean expectSeparator = isSeparated(separator); boolean separated = expectSeparator; char separatorChar= exp...
FSDMsg implements Loggeable, Cloneable { protected String read (InputStreamReader r, int len, String type, String separator) throws IOException { StringBuilder sb = new StringBuilder(); char[] c = new char[1]; boolean expectSeparator = isSeparated(separator); boolean separated = expectSeparator; char separatorChar= exp...
FSDMsg implements Loggeable, Cloneable { protected String read (InputStreamReader r, int len, String type, String separator) throws IOException { StringBuilder sb = new StringBuilder(); char[] c = new char[1]; boolean expectSeparator = isSeparated(separator); boolean separated = expectSeparator; char separatorChar= exp...
FSDMsg implements Loggeable, Cloneable { protected String read (InputStreamReader r, int len, String type, String separator) throws IOException { StringBuilder sb = new StringBuilder(); char[] c = new char[1]; boolean expectSeparator = isSeparated(separator); boolean separated = expectSeparator; char separatorChar= exp...
@Test public void testSet() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath"); fSDMsg.set("testFSDMsgName", null); assertEquals(0, fSDMsg.fields.size(), "fSDMsg.fields.size()"); }
public void set (String name, String value) { if (value != null) fields.put (name, value); else fields.remove (name); }
FSDMsg implements Loggeable, Cloneable { public void set (String name, String value) { if (value != null) fields.put (name, value); else fields.remove (name); } }
FSDMsg implements Loggeable, Cloneable { public void set (String name, String value) { if (value != null) fields.put (name, value); else fields.remove (name); } FSDMsg(String basePath); FSDMsg(String basePath, String baseSchema); }
FSDMsg implements Loggeable, Cloneable { public void set (String name, String value) { if (value != null) fields.put (name, value); else fields.remove (name); } FSDMsg(String basePath); FSDMsg(String basePath, String baseSchema); String getBasePath(); String getBaseSchema(); void setCharset(Charset charset); void setS...
FSDMsg implements Loggeable, Cloneable { public void set (String name, String value) { if (value != null) fields.put (name, value); else fields.remove (name); } FSDMsg(String basePath); FSDMsg(String basePath, String baseSchema); String getBasePath(); String getBaseSchema(); void setCharset(Charset charset); void setS...
@Test public void testSetHeader() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath", "testFSDMsgBaseSchema"); byte[] h = new byte[2]; fSDMsg.setHeader(h); assertSame(h, fSDMsg.header, "fSDMsg.header"); }
public void setHeader (byte[] h) { this.header = h; }
FSDMsg implements Loggeable, Cloneable { public void setHeader (byte[] h) { this.header = h; } }
FSDMsg implements Loggeable, Cloneable { public void setHeader (byte[] h) { this.header = h; } FSDMsg(String basePath); FSDMsg(String basePath, String baseSchema); }
FSDMsg implements Loggeable, Cloneable { public void setHeader (byte[] h) { this.header = h; } FSDMsg(String basePath); FSDMsg(String basePath, String baseSchema); String getBasePath(); String getBaseSchema(); void setCharset(Charset charset); void setSeparator(String separatorName, char separator); void unsetSeparato...
FSDMsg implements Loggeable, Cloneable { public void setHeader (byte[] h) { this.header = h; } FSDMsg(String basePath); FSDMsg(String basePath, String baseSchema); String getBasePath(); String getBaseSchema(); void setCharset(Charset charset); void setSeparator(String separatorName, char separator); void unsetSeparato...
@Test public void testSetSeparator() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath"); fSDMsg.setSeparator("testFSDMsgSeparatorName", ' '); assertEquals(Character.valueOf(' '), fSDMsg.separators.get("testFSDMsgSeparatorName"), "fSDMsg.separators.get(\"testFSDMsgSeparatorName\")"); }
public void setSeparator(String separatorName, char separator) { separators.put(separatorName, separator); }
FSDMsg implements Loggeable, Cloneable { public void setSeparator(String separatorName, char separator) { separators.put(separatorName, separator); } }
FSDMsg implements Loggeable, Cloneable { public void setSeparator(String separatorName, char separator) { separators.put(separatorName, separator); } FSDMsg(String basePath); FSDMsg(String basePath, String baseSchema); }
FSDMsg implements Loggeable, Cloneable { public void setSeparator(String separatorName, char separator) { separators.put(separatorName, separator); } FSDMsg(String basePath); FSDMsg(String basePath, String baseSchema); String getBasePath(); String getBaseSchema(); void setCharset(Charset charset); void setSeparator(St...
FSDMsg implements Loggeable, Cloneable { public void setSeparator(String separatorName, char separator) { separators.put(separatorName, separator); } FSDMsg(String basePath); FSDMsg(String basePath, String baseSchema); String getBasePath(); String getBaseSchema(); void setCharset(Charset charset); void setSeparator(St...
@Test public void testToXML() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath", "testFSDMsgBaseSchema"); byte[] h = new byte[2]; fSDMsg.setHeader(h); Element result = fSDMsg.toXML(); assertEquals("message", result.getName(), "result.getName()"); assertEquals(0, fSDMsg.fields.size(), "fSDMsg.fields.siz...
public Element toXML () { Element e = new Element ("message"); if (header != null) { e.addContent ( new Element ("header") .setText (getHexHeader ()) ); } for (String fieldName :fields.keySet()) { Element inner = new Element (fieldName); inner.addContent (ISOUtil.normalize (fields.get (fieldName))); e.addContent (inner...
FSDMsg implements Loggeable, Cloneable { public Element toXML () { Element e = new Element ("message"); if (header != null) { e.addContent ( new Element ("header") .setText (getHexHeader ()) ); } for (String fieldName :fields.keySet()) { Element inner = new Element (fieldName); inner.addContent (ISOUtil.normalize (fiel...
FSDMsg implements Loggeable, Cloneable { public Element toXML () { Element e = new Element ("message"); if (header != null) { e.addContent ( new Element ("header") .setText (getHexHeader ()) ); } for (String fieldName :fields.keySet()) { Element inner = new Element (fieldName); inner.addContent (ISOUtil.normalize (fiel...
FSDMsg implements Loggeable, Cloneable { public Element toXML () { Element e = new Element ("message"); if (header != null) { e.addContent ( new Element ("header") .setText (getHexHeader ()) ); } for (String fieldName :fields.keySet()) { Element inner = new Element (fieldName); inner.addContent (ISOUtil.normalize (fiel...
FSDMsg implements Loggeable, Cloneable { public Element toXML () { Element e = new Element ("message"); if (header != null) { e.addContent ( new Element ("header") .setText (getHexHeader ()) ); } for (String fieldName :fields.keySet()) { Element inner = new Element (fieldName); inner.addContent (ISOUtil.normalize (fiel...
@Test public void testAppendFixedLengthOneNull() { instance = BUILDER_FL1.build(); instance.append(TEST_TAG1, (byte[]) null); }
public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
@Test public void testToXML3() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath"); Element result = fSDMsg.toXML(); assertEquals("message", result.getName(), "result.getName()"); assertEquals(0, fSDMsg.fields.size(), "fSDMsg.fields.size()"); }
public Element toXML () { Element e = new Element ("message"); if (header != null) { e.addContent ( new Element ("header") .setText (getHexHeader ()) ); } for (String fieldName :fields.keySet()) { Element inner = new Element (fieldName); inner.addContent (ISOUtil.normalize (fields.get (fieldName))); e.addContent (inner...
FSDMsg implements Loggeable, Cloneable { public Element toXML () { Element e = new Element ("message"); if (header != null) { e.addContent ( new Element ("header") .setText (getHexHeader ()) ); } for (String fieldName :fields.keySet()) { Element inner = new Element (fieldName); inner.addContent (ISOUtil.normalize (fiel...
FSDMsg implements Loggeable, Cloneable { public Element toXML () { Element e = new Element ("message"); if (header != null) { e.addContent ( new Element ("header") .setText (getHexHeader ()) ); } for (String fieldName :fields.keySet()) { Element inner = new Element (fieldName); inner.addContent (ISOUtil.normalize (fiel...
FSDMsg implements Loggeable, Cloneable { public Element toXML () { Element e = new Element ("message"); if (header != null) { e.addContent ( new Element ("header") .setText (getHexHeader ()) ); } for (String fieldName :fields.keySet()) { Element inner = new Element (fieldName); inner.addContent (ISOUtil.normalize (fiel...
FSDMsg implements Loggeable, Cloneable { public Element toXML () { Element e = new Element ("message"); if (header != null) { e.addContent ( new Element ("header") .setText (getHexHeader ()) ); } for (String fieldName :fields.keySet()) { Element inner = new Element (fieldName); inner.addContent (ISOUtil.normalize (fiel...
@Test public void testUnpack() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath"); InputStream is = new ByteArrayInputStream(new byte[1]); InputStreamReader r = new InputStreamReader(is); Element schema = new Element("testFSDMsgName", "testFSDMsgUri"); fSDMsg.unpack(r, schema); assertEquals(0, fSDMsg.f...
public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (EOFException e) { if (!fields.isEmpty()) f...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
@Test public void testUnpackThrowsMalformedURLException() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath"); byte[] b = new byte[1]; try { fSDMsg.unpack(b); fail("Expected MalformedURLException to be thrown"); } catch (MalformedURLException ex) { assertEquals(MalformedURLException.class, ex.getClass()...
public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (EOFException e) { if (!fields.isEmpty()) f...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
@Test public void testUnpackThrowsMalformedURLException1() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath", "testFSDMsgBaseSchema"); byte[] bytes = new byte[3]; InputStream is = new ByteArrayInputStream(bytes); try { fSDMsg.unpack(is); fail("Expected MalformedURLException to be thrown"); } catch (Mal...
public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (EOFException e) { if (!fields.isEmpty()) f...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
@Test public void testUnpackThrowsNullPointerException() throws Throwable { FSDMsg fSDMsg = new FSDMsg(null, "testFSDMsgBaseSchema"); byte[] b = new byte[1]; try { fSDMsg.unpack(b); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { assertEquals("basePath can not be null", ex.getMes...
public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (EOFException e) { if (!fields.isEmpty()) f...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
@Test public void testUnpackThrowsNullPointerException1() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath"); InputStream is = new ByteArrayInputStream(new byte[0]); InputStreamReader r = new InputStreamReader(is); try { fSDMsg.unpack(r, null); fail("Expected NullPointerException to be thrown"); } catc...
public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (EOFException e) { if (!fields.isEmpty()) f...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
@Test public void testUnpackThrowsNullPointerException2() throws Throwable { FSDMsg fSDMsg = new FSDMsg(null, "testFSDMsgBaseSchema"); byte[] bytes = new byte[3]; InputStream is = new ByteArrayInputStream(bytes); try { fSDMsg.unpack(is); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ...
public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (EOFException e) { if (!fields.isEmpty()) f...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
FSDMsg implements Loggeable, Cloneable { public void unpack (InputStream is) throws IOException, JDOMException { try { if (is.markSupported()) is.mark(READ_BUFFER); unpack (new InputStreamReader(is, charset), getSchema (baseSchema)); if (is.markSupported()) { is.reset(); is.skip (readCount); readCount = 0; } } catch (E...
@Test public void testUnsetSeparator() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath"); fSDMsg.unsetSeparator("US"); assertFalse(fSDMsg.separators.containsKey("US"), "fSDMsg.separators.containsKey(\"US\")"); }
public void unsetSeparator(String separatorName) { if (!separators.containsKey(separatorName)) throw new IllegalArgumentException("unsetSeparator was attempted for "+ separatorName+" which was not previously defined."); separators.remove(separatorName); }
FSDMsg implements Loggeable, Cloneable { public void unsetSeparator(String separatorName) { if (!separators.containsKey(separatorName)) throw new IllegalArgumentException("unsetSeparator was attempted for "+ separatorName+" which was not previously defined."); separators.remove(separatorName); } }
FSDMsg implements Loggeable, Cloneable { public void unsetSeparator(String separatorName) { if (!separators.containsKey(separatorName)) throw new IllegalArgumentException("unsetSeparator was attempted for "+ separatorName+" which was not previously defined."); separators.remove(separatorName); } FSDMsg(String basePath)...
FSDMsg implements Loggeable, Cloneable { public void unsetSeparator(String separatorName) { if (!separators.containsKey(separatorName)) throw new IllegalArgumentException("unsetSeparator was attempted for "+ separatorName+" which was not previously defined."); separators.remove(separatorName); } FSDMsg(String basePath)...
FSDMsg implements Loggeable, Cloneable { public void unsetSeparator(String separatorName) { if (!separators.containsKey(separatorName)) throw new IllegalArgumentException("unsetSeparator was attempted for "+ separatorName+" which was not previously defined."); separators.remove(separatorName); } FSDMsg(String basePath)...
@Test public void testUnsetSeparatorThrowsRuntimeException() throws Throwable { FSDMsg fSDMsg = new FSDMsg("testFSDMsgBasePath"); try { fSDMsg.unsetSeparator("testFSDMsgSeparatorName"); fail("Expected RuntimeException to be thrown"); } catch (RuntimeException ex) { assertEquals("unsetSeparator was attempted for testFSD...
public void unsetSeparator(String separatorName) { if (!separators.containsKey(separatorName)) throw new IllegalArgumentException("unsetSeparator was attempted for "+ separatorName+" which was not previously defined."); separators.remove(separatorName); }
FSDMsg implements Loggeable, Cloneable { public void unsetSeparator(String separatorName) { if (!separators.containsKey(separatorName)) throw new IllegalArgumentException("unsetSeparator was attempted for "+ separatorName+" which was not previously defined."); separators.remove(separatorName); } }
FSDMsg implements Loggeable, Cloneable { public void unsetSeparator(String separatorName) { if (!separators.containsKey(separatorName)) throw new IllegalArgumentException("unsetSeparator was attempted for "+ separatorName+" which was not previously defined."); separators.remove(separatorName); } FSDMsg(String basePath)...
FSDMsg implements Loggeable, Cloneable { public void unsetSeparator(String separatorName) { if (!separators.containsKey(separatorName)) throw new IllegalArgumentException("unsetSeparator was attempted for "+ separatorName+" which was not previously defined."); separators.remove(separatorName); } FSDMsg(String basePath)...
FSDMsg implements Loggeable, Cloneable { public void unsetSeparator(String separatorName) { if (!separators.containsKey(separatorName)) throw new IllegalArgumentException("unsetSeparator was attempted for "+ separatorName+" which was not previously defined."); separators.remove(separatorName); } FSDMsg(String basePath)...
@Test public void testGetInstance() throws Throwable { NameRegistrar result = NameRegistrar.getInstance(); assertThat(result, is(sameInstance(NameRegistrar.getInstance()))); }
public static NameRegistrar getInstance() { return instance; }
NameRegistrar implements Loggeable { public static NameRegistrar getInstance() { return instance; } }
NameRegistrar implements Loggeable { public static NameRegistrar getInstance() { return instance; } private NameRegistrar(); }
NameRegistrar implements Loggeable { public static NameRegistrar getInstance() { return instance; } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(String key, Object value); static void unregister(String ...
NameRegistrar implements Loggeable { public static NameRegistrar getInstance() { return instance; } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(String key, Object value); static void unregister(String ...
@Test public void testAppendFixedLengthOneAbove() { assertThrows(IllegalArgumentException.class, () -> { instance = BUILDER_FL1.build(); instance.append(TEST_TAG1, new byte[0x100]); }); }
public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
@Test public void testGet() throws Exception { String value = NameRegistrar.get("test1"); assertThat(value, is("testValue1")); }
public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; }
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } }
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } private NameRegistrar(); }
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> g...
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> g...
@Test public void testGetThrowsNotFoundException() throws Throwable { assertThrows(NameRegistrar.NotFoundException.class, () -> { NameRegistrar.get("NonexistentKey"); }); }
public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; }
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } }
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } private NameRegistrar(); }
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> g...
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> g...
@Test public void testGetIfExists() throws Throwable { String value = NameRegistrar.getIfExists("test2"); assertThat(value, is("testValue2")); }
public static <T> T getIfExists(String key) { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); return obj; }
NameRegistrar implements Loggeable { public static <T> T getIfExists(String key) { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); return obj; } }
NameRegistrar implements Loggeable { public static <T> T getIfExists(String key) { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); return obj; } private NameRegistrar(); }
NameRegistrar implements Loggeable { public static <T> T getIfExists(String key) { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); return obj; } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(Stri...
NameRegistrar implements Loggeable { public static <T> T getIfExists(String key) { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); return obj; } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(Stri...
@Test public void testGetIfExistsWithNotFoundKey() throws Exception { String value = NameRegistrar.getIfExists("NonexistentKey"); assertThat(value, is(nullValue())); }
public static <T> T getIfExists(String key) { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); return obj; }
NameRegistrar implements Loggeable { public static <T> T getIfExists(String key) { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); return obj; } }
NameRegistrar implements Loggeable { public static <T> T getIfExists(String key) { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); return obj; } private NameRegistrar(); }
NameRegistrar implements Loggeable { public static <T> T getIfExists(String key) { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); return obj; } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(Stri...
NameRegistrar implements Loggeable { public static <T> T getIfExists(String key) { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); return obj; } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(Stri...
@Test public void testUnregister() throws Exception { assertThrows(NameRegistrar.NotFoundException.class, () -> { NameRegistrar.register("test3", "someTest3Value"); assertThat(NameRegistrar.get("test3"), is("someTest3Value")); NameRegistrar.unregister("test3"); NameRegistrar.get("test3"); }); }
public static void unregister(String key) { SpaceUtil.wipe(sp, key); }
NameRegistrar implements Loggeable { public static void unregister(String key) { SpaceUtil.wipe(sp, key); } }
NameRegistrar implements Loggeable { public static void unregister(String key) { SpaceUtil.wipe(sp, key); } private NameRegistrar(); }
NameRegistrar implements Loggeable { public static void unregister(String key) { SpaceUtil.wipe(sp, key); } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(String key, Object value); static void unregister...
NameRegistrar implements Loggeable { public static void unregister(String key) { SpaceUtil.wipe(sp, key); } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(String key, Object value); static void unregister...
@Test public void testUnregisterUnknownKeyDoesNotThrowException() throws Exception { NameRegistrar.unregister("unknownKey"); }
public static void unregister(String key) { SpaceUtil.wipe(sp, key); }
NameRegistrar implements Loggeable { public static void unregister(String key) { SpaceUtil.wipe(sp, key); } }
NameRegistrar implements Loggeable { public static void unregister(String key) { SpaceUtil.wipe(sp, key); } private NameRegistrar(); }
NameRegistrar implements Loggeable { public static void unregister(String key) { SpaceUtil.wipe(sp, key); } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(String key, Object value); static void unregister...
NameRegistrar implements Loggeable { public static void unregister(String key) { SpaceUtil.wipe(sp, key); } private NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(String key, Object value); static void unregister...
@Test void testRemovalWithoutSpaceConsolidation() { RemoveNewLinesMapper mapper = new RemoveNewLinesMapper(); mapper.NEWLINE_SEPARATORS = UNIX; mapper.newLineAtEnd = false; byte[] b = {'\n', '\n', '\n', ' ', ' ', ' ', 'a', 'b', '\n', 'c', ' ', 'd', ' ', '\n', ' ', ' '}; byte[] r = mapper.apply(b); assertArrayEquals(new...
@Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } else { if (combineSpaces && prevSpace) { buffer.put(SPACE); prevSp...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
@Test void testRemovalWithSpaceConsolidation() { RemoveNewLinesMapper mapper = new RemoveNewLinesMapper(); mapper.NEWLINE_SEPARATORS = UNIX; mapper.newLineAtEnd = false; mapper.combineSpaces = true; byte[] b = { ' ', ' ', ' ', 'a', ' ', ' ', 'b', '\n', 'c', ' ', 'd', ' ', '\n', ' ', ' '}; byte[] r = mapper.apply(b); as...
@Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } else { if (combineSpaces && prevSpace) { buffer.put(SPACE); prevSp...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
@Test void testValuesChangedByConfiguration() throws ConfigurationException { RemoveNewLinesMapper mapper = new RemoveNewLinesMapper(); SimpleConfiguration cfg = new SimpleConfiguration(); cfg.put("combine-spaces", "true"); cfg.put("newline-at-end", "false"); mapper.setConfiguration(cfg); assertTrue(mapper.combineSpace...
@Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); }
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); } }
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); } }
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); } @Override byte[] apply(byte[] bytes); @Override voi...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); } @Override byte[] apply(byte[] bytes); @Override voi...
@Test void testDefaultValues() throws ConfigurationException { RemoveNewLinesMapper mapper = new RemoveNewLinesMapper(); assertFalse(mapper.combineSpaces); assertTrue(mapper.newLineAtEnd); SimpleConfiguration cfg = new SimpleConfiguration(); mapper.setConfiguration(cfg); assertFalse(mapper.combineSpaces); assertTrue(ma...
@Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); }
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); } }
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); } }
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); } @Override byte[] apply(byte[] bytes); @Override voi...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public void setConfiguration(Configuration cfg) throws ConfigurationException { combineSpaces = cfg.getBoolean("combine-spaces", false); newLineAtEnd = cfg.getBoolean("newline-at-end", true); } @Override byte[] apply(byte[] bytes); @Override voi...
@Test public void testAppendInvalidTwoBytesTagLow() { assertThrows(IllegalArgumentException.class, () -> { instance.append(0x6f37, new byte[0]); }); }
public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
@Test void testAddNewLineAtEnd() { RemoveNewLinesMapper mapper = new RemoveNewLinesMapper(); mapper.NEWLINE_SEPARATORS = UNIX; mapper.newLineAtEnd = true; byte[] b = {'a', 'b', '\n', 'c', 'd'}; byte[] r = mapper.apply(b); assertArrayEquals(new byte[]{'a','b','c','d','\n'}, r); byte[] c = {'a', 'b', '\n', 'c', '\n'}; r ...
@Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } else { if (combineSpaces && prevSpace) { buffer.put(SPACE); prevSp...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
RemoveNewLinesMapper implements ByteArrayMapper, Configurable { @Override public byte[] apply(byte[] bytes) { final ByteBuffer buffer = ByteBuffer.allocate(bytes.length); boolean prevSpace = false; for (byte aByte : bytes) { if (aByte == SPACE) { if (combineSpaces) { prevSpace = true; } else { buffer.put(aByte); } } el...
@Test public void testGetTimer() throws Throwable { Timer result = DefaultTimer.getTimer(); assertNotNull(result, "result"); }
public static Timer getTimer() { if (defaultTimer == null) { synchronized (DefaultTimer.class) { if (defaultTimer == null) defaultTimer = new Timer(true); } } return defaultTimer; }
DefaultTimer { public static Timer getTimer() { if (defaultTimer == null) { synchronized (DefaultTimer.class) { if (defaultTimer == null) defaultTimer = new Timer(true); } } return defaultTimer; } }
DefaultTimer { public static Timer getTimer() { if (defaultTimer == null) { synchronized (DefaultTimer.class) { if (defaultTimer == null) defaultTimer = new Timer(true); } } return defaultTimer; } private DefaultTimer(); }
DefaultTimer { public static Timer getTimer() { if (defaultTimer == null) { synchronized (DefaultTimer.class) { if (defaultTimer == null) defaultTimer = new Timer(true); } } return defaultTimer; } private DefaultTimer(); static Timer getTimer(); }
DefaultTimer { public static Timer getTimer() { if (defaultTimer == null) { synchronized (DefaultTimer.class) { if (defaultTimer == null) defaultTimer = new Timer(true); } } return defaultTimer; } private DefaultTimer(); static Timer getTimer(); }
@Test public void testCloseCompressedOutputStream() throws Throwable { OutputStream os = new DeflaterOutputStream(new PrintStream(new ByteArrayOutputStream()), new Deflater()); DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.closeCompressedOutputStream(os); assertTrue(true, "Test completed ...
protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); }
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } }
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } DailyLogListener(); }
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); ...
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); ...
@Test public void testCloseCompressedOutputStream1() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); OutputStream os = new DataOutputStream(new ByteArrayOutputStream()); dailyLogListener.closeCompressedOutputStream(os); assertEquals(0, ((DataOutputStream) os).size(), "(DataOutputStream) o...
protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); }
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } }
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } DailyLogListener(); }
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); ...
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); ...
@Test public void testCloseCompressedOutputStreamThrowsNullPointerException() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); try { dailyLogListener.closeCompressedOutputStream(null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersion...
protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); }
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } }
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } DailyLogListener(); }
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); ...
DailyLogListener extends RotateLogListener { protected void closeCompressedOutputStream(OutputStream os) throws IOException{ if (os instanceof DeflaterOutputStream) ((DeflaterOutputStream)os).finish(); os.close(); } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); ...
@Test public void testCompress() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.compress(new File("testDailyLogListenerParam1")); assertEquals(0, dailyLogListener.getCompressionFormat(), "dailyLogListener.getCompressionFormat()"); }
protected void compress(File logFile) { if (getCompressionFormat() != NONE){ Thread t = getCompressorThread(logFile); try{ if (t != null) t.start(); } catch (Exception e){ logDebugEx("error compressing file",e); } } }
DailyLogListener extends RotateLogListener { protected void compress(File logFile) { if (getCompressionFormat() != NONE){ Thread t = getCompressorThread(logFile); try{ if (t != null) t.start(); } catch (Exception e){ logDebugEx("error compressing file",e); } } } }
DailyLogListener extends RotateLogListener { protected void compress(File logFile) { if (getCompressionFormat() != NONE){ Thread t = getCompressorThread(logFile); try{ if (t != null) t.start(); } catch (Exception e){ logDebugEx("error compressing file",e); } } } DailyLogListener(); }
DailyLogListener extends RotateLogListener { protected void compress(File logFile) { if (getCompressionFormat() != NONE){ Thread t = getCompressorThread(logFile); try{ if (t != null) t.start(); } catch (Exception e){ logDebugEx("error compressing file",e); } } } DailyLogListener(); void setConfiguration(Configuration c...
DailyLogListener extends RotateLogListener { protected void compress(File logFile) { if (getCompressionFormat() != NONE){ Thread t = getCompressorThread(logFile); try{ if (t != null) t.start(); } catch (Exception e){ logDebugEx("error compressing file",e); } } } DailyLogListener(); void setConfiguration(Configuration c...
@Test public void testGetCompressedOutputStreamThrowsNullPointerException() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); try { dailyLogListener.getCompressedOutputStream(null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { } }
protected OutputStream getCompressedOutputStream(File f) throws IOException{ OutputStream os = new BufferedOutputStream(new FileOutputStream(f)); if (getCompressionFormat() == ZIP) { ZipOutputStream ret = new ZipOutputStream(os); ret.putNextEntry(new ZipEntry(logName)); return ret; } else { return new GZIPOutputStream(...
DailyLogListener extends RotateLogListener { protected OutputStream getCompressedOutputStream(File f) throws IOException{ OutputStream os = new BufferedOutputStream(new FileOutputStream(f)); if (getCompressionFormat() == ZIP) { ZipOutputStream ret = new ZipOutputStream(os); ret.putNextEntry(new ZipEntry(logName)); retu...
DailyLogListener extends RotateLogListener { protected OutputStream getCompressedOutputStream(File f) throws IOException{ OutputStream os = new BufferedOutputStream(new FileOutputStream(f)); if (getCompressionFormat() == ZIP) { ZipOutputStream ret = new ZipOutputStream(os); ret.putNextEntry(new ZipEntry(logName)); retu...
DailyLogListener extends RotateLogListener { protected OutputStream getCompressedOutputStream(File f) throws IOException{ OutputStream os = new BufferedOutputStream(new FileOutputStream(f)); if (getCompressionFormat() == ZIP) { ZipOutputStream ret = new ZipOutputStream(os); ret.putNextEntry(new ZipEntry(logName)); retu...
DailyLogListener extends RotateLogListener { protected OutputStream getCompressedOutputStream(File f) throws IOException{ OutputStream os = new BufferedOutputStream(new FileOutputStream(f)); if (getCompressionFormat() == ZIP) { ZipOutputStream ret = new ZipOutputStream(os); ret.putNextEntry(new ZipEntry(logName)); retu...
@Test public void testGetCompressorThread() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.getCompressorThread(new File("testDailyLogListenerParam1")); assertTrue(true, "Test completed without Exception"); }
protected Thread getCompressorThread(File f){ return new Thread(new Compressor(f),"DailyLogListener-Compressor"); }
DailyLogListener extends RotateLogListener { protected Thread getCompressorThread(File f){ return new Thread(new Compressor(f),"DailyLogListener-Compressor"); } }
DailyLogListener extends RotateLogListener { protected Thread getCompressorThread(File f){ return new Thread(new Compressor(f),"DailyLogListener-Compressor"); } DailyLogListener(); }
DailyLogListener extends RotateLogListener { protected Thread getCompressorThread(File f){ return new Thread(new Compressor(f),"DailyLogListener-Compressor"); } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void...
DailyLogListener extends RotateLogListener { protected Thread getCompressorThread(File f){ return new Thread(new Compressor(f),"DailyLogListener-Compressor"); } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void...
@Test public void testLogDebugEx() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.logDebugEx("testDailyLogListenerMsg", new NullPointerException("testDailyLogListenerParam1")); assertNotNull(dailyLogListener.p, "dailyLogListener.p"); }
protected void logDebugEx(String msg, Throwable e){ ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); ps.println(msg); e.printStackTrace(ps); ps.close(); logDebug(os.toString()); }
DailyLogListener extends RotateLogListener { protected void logDebugEx(String msg, Throwable e){ ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); ps.println(msg); e.printStackTrace(ps); ps.close(); logDebug(os.toString()); } }
DailyLogListener extends RotateLogListener { protected void logDebugEx(String msg, Throwable e){ ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); ps.println(msg); e.printStackTrace(ps); ps.close(); logDebug(os.toString()); } DailyLogListener(); }
DailyLogListener extends RotateLogListener { protected void logDebugEx(String msg, Throwable e){ ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); ps.println(msg); e.printStackTrace(ps); ps.close(); logDebug(os.toString()); } DailyLogListener(); void setConfiguration(Configur...
DailyLogListener extends RotateLogListener { protected void logDebugEx(String msg, Throwable e){ ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); ps.println(msg); e.printStackTrace(ps); ps.close(); logDebug(os.toString()); } DailyLogListener(); void setConfiguration(Configur...
@Test public void testLogDebugExThrowsNullPointerException() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); try { dailyLogListener.logDebugEx("testDailyLogListenerMsg", null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(...
protected void logDebugEx(String msg, Throwable e){ ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); ps.println(msg); e.printStackTrace(ps); ps.close(); logDebug(os.toString()); }
DailyLogListener extends RotateLogListener { protected void logDebugEx(String msg, Throwable e){ ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); ps.println(msg); e.printStackTrace(ps); ps.close(); logDebug(os.toString()); } }
DailyLogListener extends RotateLogListener { protected void logDebugEx(String msg, Throwable e){ ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); ps.println(msg); e.printStackTrace(ps); ps.close(); logDebug(os.toString()); } DailyLogListener(); }
DailyLogListener extends RotateLogListener { protected void logDebugEx(String msg, Throwable e){ ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); ps.println(msg); e.printStackTrace(ps); ps.close(); logDebug(os.toString()); } DailyLogListener(); void setConfiguration(Configur...
DailyLogListener extends RotateLogListener { protected void logDebugEx(String msg, Throwable e){ ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); ps.println(msg); e.printStackTrace(ps); ps.close(); logDebug(os.toString()); } DailyLogListener(); void setConfiguration(Configur...
@Test public void testAppendInvalidTwoBytesTagHigh() { assertThrows(IllegalArgumentException.class, () -> { instance.append(0xaf37, new byte[0]); }); }
public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
@Test public void testSetCompressedSuffix() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.setCompressedSuffix("testDailyLogListenerCompressedSuffix"); assertEquals("testDailyLogListenerCompressedSuffix", dailyLogListener.getCompressedSuffix(), "dailyLogListener.getCompr...
public void setCompressedSuffix(String compressedSuffix) { this.compressedSuffix = compressedSuffix; }
DailyLogListener extends RotateLogListener { public void setCompressedSuffix(String compressedSuffix) { this.compressedSuffix = compressedSuffix; } }
DailyLogListener extends RotateLogListener { public void setCompressedSuffix(String compressedSuffix) { this.compressedSuffix = compressedSuffix; } DailyLogListener(); }
DailyLogListener extends RotateLogListener { public void setCompressedSuffix(String compressedSuffix) { this.compressedSuffix = compressedSuffix; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(St...
DailyLogListener extends RotateLogListener { public void setCompressedSuffix(String compressedSuffix) { this.compressedSuffix = compressedSuffix; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(St...
@Test public void testSetCompressionBufferSize() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.setCompressionBufferSize(-1); assertEquals(131072, dailyLogListener.getCompressionBufferSize(), "dailyLogListener.getCompressionBufferSize()"); }
public void setCompressionBufferSize(int compressionBufferSize) { this.compressionBufferSize = compressionBufferSize >= 0 ? compressionBufferSize : DEF_BUFFER_SIZE; }
DailyLogListener extends RotateLogListener { public void setCompressionBufferSize(int compressionBufferSize) { this.compressionBufferSize = compressionBufferSize >= 0 ? compressionBufferSize : DEF_BUFFER_SIZE; } }
DailyLogListener extends RotateLogListener { public void setCompressionBufferSize(int compressionBufferSize) { this.compressionBufferSize = compressionBufferSize >= 0 ? compressionBufferSize : DEF_BUFFER_SIZE; } DailyLogListener(); }
DailyLogListener extends RotateLogListener { public void setCompressionBufferSize(int compressionBufferSize) { this.compressionBufferSize = compressionBufferSize >= 0 ? compressionBufferSize : DEF_BUFFER_SIZE; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void...
DailyLogListener extends RotateLogListener { public void setCompressionBufferSize(int compressionBufferSize) { this.compressionBufferSize = compressionBufferSize >= 0 ? compressionBufferSize : DEF_BUFFER_SIZE; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void...
@Test public void testSetCompressionFormat() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.setCompressionFormat(100); assertEquals(100, dailyLogListener.getCompressionFormat(), "dailyLogListener.getCompressionFormat()"); }
public void setCompressionFormat(int compressionFormat) { this.compressionFormat = compressionFormat; }
DailyLogListener extends RotateLogListener { public void setCompressionFormat(int compressionFormat) { this.compressionFormat = compressionFormat; } }
DailyLogListener extends RotateLogListener { public void setCompressionFormat(int compressionFormat) { this.compressionFormat = compressionFormat; } DailyLogListener(); }
DailyLogListener extends RotateLogListener { public void setCompressionFormat(int compressionFormat) { this.compressionFormat = compressionFormat; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(S...
DailyLogListener extends RotateLogListener { public void setCompressionFormat(int compressionFormat) { this.compressionFormat = compressionFormat; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(S...
@Test public void testSetDateFmt() throws Throwable { DateFormat dateFmt = DateFormat.getInstance(); DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.setDateFmt(dateFmt); assertSame(dateFmt, dailyLogListener.getDateFmt(), "dailyLogListener.getDateFmt()"); }
public void setDateFmt(DateFormat dateFmt) { this.dateFmt = dateFmt; }
DailyLogListener extends RotateLogListener { public void setDateFmt(DateFormat dateFmt) { this.dateFmt = dateFmt; } }
DailyLogListener extends RotateLogListener { public void setDateFmt(DateFormat dateFmt) { this.dateFmt = dateFmt; } DailyLogListener(); }
DailyLogListener extends RotateLogListener { public void setDateFmt(DateFormat dateFmt) { this.dateFmt = dateFmt; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRotateCount...
DailyLogListener extends RotateLogListener { public void setDateFmt(DateFormat dateFmt) { this.dateFmt = dateFmt; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRotateCount...
@Test public void testSetLastDate() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.setLastDate("testDailyLogListenerLastDate"); assertEquals("testDailyLogListenerLastDate", dailyLogListener.getLastDate(), "dailyLogListener.getLastDate()"); }
public void setLastDate(String lastDate) { this.lastDate = lastDate; }
DailyLogListener extends RotateLogListener { public void setLastDate(String lastDate) { this.lastDate = lastDate; } }
DailyLogListener extends RotateLogListener { public void setLastDate(String lastDate) { this.lastDate = lastDate; } DailyLogListener(); }
DailyLogListener extends RotateLogListener { public void setLastDate(String lastDate) { this.lastDate = lastDate; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRotateCount...
DailyLogListener extends RotateLogListener { public void setLastDate(String lastDate) { this.lastDate = lastDate; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRotateCount...
@Test public void testSetPrefix() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.setPrefix("testDailyLogListenerPrefix"); assertEquals("testDailyLogListenerPrefix", dailyLogListener.getPrefix(), "dailyLogListener.getPrefix()"); }
public void setPrefix(String prefix) { this.prefix = prefix; }
DailyLogListener extends RotateLogListener { public void setPrefix(String prefix) { this.prefix = prefix; } }
DailyLogListener extends RotateLogListener { public void setPrefix(String prefix) { this.prefix = prefix; } DailyLogListener(); }
DailyLogListener extends RotateLogListener { public void setPrefix(String prefix) { this.prefix = prefix; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRotateCount(); void...
DailyLogListener extends RotateLogListener { public void setPrefix(String prefix) { this.prefix = prefix; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRotateCount(); void...
@Test public void testSetRotateCount() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.setRotateCount(100); assertEquals(100, dailyLogListener.getRotateCount(), "dailyLogListener.getRotateCount()"); }
public void setRotateCount(int rotateCount) { this.rotateCount = rotateCount; }
DailyLogListener extends RotateLogListener { public void setRotateCount(int rotateCount) { this.rotateCount = rotateCount; } }
DailyLogListener extends RotateLogListener { public void setRotateCount(int rotateCount) { this.rotateCount = rotateCount; } DailyLogListener(); }
DailyLogListener extends RotateLogListener { public void setRotateCount(int rotateCount) { this.rotateCount = rotateCount; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRo...
DailyLogListener extends RotateLogListener { public void setRotateCount(int rotateCount) { this.rotateCount = rotateCount; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRo...
@Test public void testSetSuffix() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); dailyLogListener.setSuffix("testDailyLogListenerSuffix"); assertEquals("testDailyLogListenerSuffix", dailyLogListener.getSuffix(), "dailyLogListener.getSuffix()"); }
public void setSuffix(String suffix) { this.suffix = suffix; }
DailyLogListener extends RotateLogListener { public void setSuffix(String suffix) { this.suffix = suffix; } }
DailyLogListener extends RotateLogListener { public void setSuffix(String suffix) { this.suffix = suffix; } DailyLogListener(); }
DailyLogListener extends RotateLogListener { public void setSuffix(String suffix) { this.suffix = suffix; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRotateCount(); void...
DailyLogListener extends RotateLogListener { public void setSuffix(String suffix) { this.suffix = suffix; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRotateCount(); void...
@Test public void testSetMaxAge() throws Throwable { DailyLogListener dailyLogListener = new DailyLogListener(); long maxAge = 7*24*3600*1000; dailyLogListener.setMaxAge(maxAge); assertEquals(maxAge, dailyLogListener.getMaxAge(), "dailyLogListener.getMaxAge()"); }
public void setMaxAge(long maxAge) { this.maxAge = maxAge; }
DailyLogListener extends RotateLogListener { public void setMaxAge(long maxAge) { this.maxAge = maxAge; } }
DailyLogListener extends RotateLogListener { public void setMaxAge(long maxAge) { this.maxAge = maxAge; } DailyLogListener(); }
DailyLogListener extends RotateLogListener { public void setMaxAge(long maxAge) { this.maxAge = maxAge; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRotateCount(); void s...
DailyLogListener extends RotateLogListener { public void setMaxAge(long maxAge) { this.maxAge = maxAge; } DailyLogListener(); void setConfiguration(Configuration cfg); void deleteOldLogs(); String getSuffix(); void setSuffix(String suffix); String getPrefix(); void setPrefix(String prefix); int getRotateCount(); void s...
@Test public void testAddMessage() throws Throwable { LogEvent logEvent = new LogEvent(new ISO87APackagerBBitmap(), "testLogEventTag", Integer.valueOf(-2)); logEvent.addMessage("false"); assertEquals(2, logEvent.getPayLoad().size(), "logEvent.payLoad.size()"); assertEquals("false", logEvent.getPayLoad().get(1), "logEve...
public void addMessage (Object msg) { payLoad.add (msg); }
LogEvent { public void addMessage (Object msg) { payLoad.add (msg); } }
LogEvent { public void addMessage (Object msg) { payLoad.add (msg); } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); }
LogEvent { public void addMessage (Object msg) { payLoad.add (msg); } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); String getTag(); void setTag(String tag); void addMessage(Object msg); void addMessage...
LogEvent { public void addMessage (Object msg) { payLoad.add (msg); } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); String getTag(); void setTag(String tag); void addMessage(Object msg); void addMessage...
@Test public void testAppendInvalidTwoBytesTagHighEndZero() { assertThrows(IllegalArgumentException.class, () -> { instance.append(0xbf00, new byte[0]); }); }
public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
@Test public void testDump() throws Throwable { PrintStream p = new PrintStream(new ByteArrayOutputStream()); new LogEvent("testLogEventTag").dump(p, "\r\n"); assertTrue(true, "Test completed without Exception"); }
public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } else newInden...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
@Test public void testDump3() throws Throwable { new LogEvent(new ThreadPool(0, 0), "testString", null).dump(new PrintStream(new ByteArrayOutputStream(), true), "a42"); assertEquals("a42", "a42", "\"a42\""); }
public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } else newInden...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
@Test public void testDumpThrowsNullPointerException() throws Throwable { try { new LogEvent("testLogEventTag").dump(null, "testLogEventIndent"); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } ...
public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } else newInden...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
LogEvent { public void dump (PrintStream p, String outer) { try { String indent = dumpHeader (p, outer); if (payLoad.isEmpty()) { if (tag != null) p.println (indent + "<" + tag + "/>"); } else { String newIndent; if (tag != null) { if (!tag.isEmpty()) p.println (indent + "<" + tag + ">"); newIndent = indent + " "; } el...
@Test public void testGetRealm() throws Throwable { LogSource source = new ISO87APackagerBBitmap(); LogEvent logEvent = new LogEvent(source, "testLogEventTag", Integer.valueOf(-2)); String result = logEvent.getRealm(); assertNull(result, "result"); assertSame(source, logEvent.getSource(), "logEvent.source"); }
public String getRealm() { return source != null ? source.getRealm() : ""; }
LogEvent { public String getRealm() { return source != null ? source.getRealm() : ""; } }
LogEvent { public String getRealm() { return source != null ? source.getRealm() : ""; } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); }
LogEvent { public String getRealm() { return source != null ? source.getRealm() : ""; } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); String getTag(); void setTag(String tag); void addMessage(Object msg...
LogEvent { public String getRealm() { return source != null ? source.getRealm() : ""; } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); String getTag(); void setTag(String tag); void addMessage(Object msg...
@Test public void testGetSource() throws Throwable { LogSource source = new ISO93APackager(); LogSource result = new LogEvent(source, "x", Integer.valueOf(64)).getSource(); assertSame(source, result, "result"); }
public LogSource getSource() { return source; }
LogEvent { public LogSource getSource() { return source; } }
LogEvent { public LogSource getSource() { return source; } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); }
LogEvent { public LogSource getSource() { return source; } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); String getTag(); void setTag(String tag); void addMessage(Object msg); void addMessage(String tag...
LogEvent { public LogSource getSource() { return source; } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); String getTag(); void setTag(String tag); void addMessage(Object msg); void addMessage(String tag...
@Test public void testSetSource() throws Throwable { LogEvent logEvent = new LogEvent(new Log(), "testLogEventTag"); LogSource source = new ISOBaseValidatingPackager(); logEvent.setSource(source); assertSame(source, logEvent.getSource(), "logEvent.source"); }
public void setSource(LogSource source) { this.source = source; }
LogEvent { public void setSource(LogSource source) { this.source = source; } }
LogEvent { public void setSource(LogSource source) { this.source = source; } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); }
LogEvent { public void setSource(LogSource source) { this.source = source; } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); String getTag(); void setTag(String tag); void addMessage(Object msg); void add...
LogEvent { public void setSource(LogSource source) { this.source = source; } LogEvent(String tag); LogEvent(); LogEvent(String tag, Object msg); LogEvent(LogSource source, String tag); LogEvent(LogSource source, String tag, Object msg); String getTag(); void setTag(String tag); void addMessage(Object msg); void add...
@Test public void testRunNames() throws Throwable { ThreadPool threadPool = new ThreadPool(1, 2); threadPool.execute(new TestTask()); ISOUtil.sleep(20); threadPool.execute(new TestTask()); ISOUtil.sleep(20); Thread[] tl = new Thread[threadPool.activeCount()]; threadPool.enumerate(tl); for (Thread t :tl ) assertThat(t.g...
public synchronized void execute(Runnable action) throws Closed { if (!pool.ready()) throw new Closed(); if (++jobs % this.maxPoolSize == 0 || pool.consumerCount() <= 0) supervise(); if (running < maxPoolSize && pool.consumerDeficit() >= 0) { new PooledThread().start(); running++; } available--; pool.enqueue (action); ...
ThreadPool extends ThreadGroup implements LogSource, Loggeable, Configurable, ThreadPoolMBean { public synchronized void execute(Runnable action) throws Closed { if (!pool.ready()) throw new Closed(); if (++jobs % this.maxPoolSize == 0 || pool.consumerCount() <= 0) supervise(); if (running < maxPoolSize && pool.consume...
ThreadPool extends ThreadGroup implements LogSource, Loggeable, Configurable, ThreadPoolMBean { public synchronized void execute(Runnable action) throws Closed { if (!pool.ready()) throw new Closed(); if (++jobs % this.maxPoolSize == 0 || pool.consumerCount() <= 0) supervise(); if (running < maxPoolSize && pool.consume...
ThreadPool extends ThreadGroup implements LogSource, Loggeable, Configurable, ThreadPoolMBean { public synchronized void execute(Runnable action) throws Closed { if (!pool.ready()) throw new Closed(); if (++jobs % this.maxPoolSize == 0 || pool.consumerCount() <= 0) supervise(); if (running < maxPoolSize && pool.consume...
ThreadPool extends ThreadGroup implements LogSource, Loggeable, Configurable, ThreadPoolMBean { public synchronized void execute(Runnable action) throws Closed { if (!pool.ready()) throw new Closed(); if (++jobs % this.maxPoolSize == 0 || pool.consumerCount() <= 0) supervise(); if (running < maxPoolSize && pool.consume...
@Test public void testDumpable() { assertThat(dumpable.name, is("testingDumpable")); assertThat(dumpable.payload, is("987654321".getBytes())); }
public Dumpable (String name, byte[] payload) { this.name = name; this.payload = payload; }
Dumpable implements Loggeable { public Dumpable (String name, byte[] payload) { this.name = name; this.payload = payload; } }
Dumpable implements Loggeable { public Dumpable (String name, byte[] payload) { this.name = name; this.payload = payload; } Dumpable(String name, byte[] payload); }
Dumpable implements Loggeable { public Dumpable (String name, byte[] payload) { this.name = name; this.payload = payload; } Dumpable(String name, byte[] payload); void dump(PrintStream p, String indent); }
Dumpable implements Loggeable { public Dumpable (String name, byte[] payload) { this.name = name; this.payload = payload; } Dumpable(String name, byte[] payload); void dump(PrintStream p, String indent); }
@Test public void testDump() { ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream p = new PrintStream(baos); dumpable.dump(p, ":-o"); String lineSep = System.getProperty ("line.separator"); String expected = ":-o<testingDumpable>" + lineSep + "0000 39 38 37 36 35 34 33 32 31 987654321" + lineSep + ":...
public void dump(PrintStream p, String indent) { p.println (indent + "<" + name + ">"); p.print (ISOUtil.hexdump (payload)); p.println (indent + "</" + name + ">"); }
Dumpable implements Loggeable { public void dump(PrintStream p, String indent) { p.println (indent + "<" + name + ">"); p.print (ISOUtil.hexdump (payload)); p.println (indent + "</" + name + ">"); } }
Dumpable implements Loggeable { public void dump(PrintStream p, String indent) { p.println (indent + "<" + name + ">"); p.print (ISOUtil.hexdump (payload)); p.println (indent + "</" + name + ">"); } Dumpable(String name, byte[] payload); }
Dumpable implements Loggeable { public void dump(PrintStream p, String indent) { p.println (indent + "<" + name + ">"); p.print (ISOUtil.hexdump (payload)); p.println (indent + "</" + name + ">"); } Dumpable(String name, byte[] payload); void dump(PrintStream p, String indent); }
Dumpable implements Loggeable { public void dump(PrintStream p, String indent) { p.println (indent + "<" + name + ">"); p.print (ISOUtil.hexdump (payload)); p.println (indent + "</" + name + ">"); } Dumpable(String name, byte[] payload); void dump(PrintStream p, String indent); }
@Test public void testNeedsCDATAjson() { String json = "{\"amount\": 123}"; assertFalse(LogUtil.needsCDATA(json)); }
public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); static final Pattern xmlReservedPattern; }
@Test public void testAppendInvalidThreeBytesTagHigh() { assertThrows(IllegalArgumentException.class, () -> { instance.append(0xbf4f37, new byte[0]); }); }
public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
@Test public void testNeedsCDATAxml() { String xml = "<tag>hello</tag>"; assertTrue(LogUtil.needsCDATA(xml)); }
public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); static final Pattern xmlReservedPattern; }
@Test public void testNeedsCDATAapos() { String apostrophe = "Rock'n roll"; assertFalse(LogUtil.needsCDATA(apostrophe)); }
public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); static final Pattern xmlReservedPattern; }
@Test public void testNeedsCDATAamp() { String amp = "This & that"; assertTrue(LogUtil.needsCDATA(amp)); }
public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); static final Pattern xmlReservedPattern; }
@Test public void testNeedsCDATA() { String normal = "The quick brown fox jumps over the lazy dog"; assertFalse(LogUtil.needsCDATA(normal)); }
public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); }
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); } static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); static final Pattern xmlReservedPattern; }
@Test public void testLogThrowsNullPointerException() throws Throwable { try { new ProtectedLogListener().log(null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot i...
public LogEvent log (LogEvent ev) { synchronized (ev.getPayLoad()) { final List<Object> payLoad = ev.getPayLoad(); int size = payLoad.size(); for (int i=0; i<size; i++) { Object obj = payLoad.get (i); if (obj instanceof ISOMsg) { ISOMsg m = (ISOMsg) ((ISOMsg) obj).clone(); try { checkProtected (m); checkHidden (m); } c...
ProtectedLogListener implements LogListener, Configurable { public LogEvent log (LogEvent ev) { synchronized (ev.getPayLoad()) { final List<Object> payLoad = ev.getPayLoad(); int size = payLoad.size(); for (int i=0; i<size; i++) { Object obj = payLoad.get (i); if (obj instanceof ISOMsg) { ISOMsg m = (ISOMsg) ((ISOMsg) ...
ProtectedLogListener implements LogListener, Configurable { public LogEvent log (LogEvent ev) { synchronized (ev.getPayLoad()) { final List<Object> payLoad = ev.getPayLoad(); int size = payLoad.size(); for (int i=0; i<size; i++) { Object obj = payLoad.get (i); if (obj instanceof ISOMsg) { ISOMsg m = (ISOMsg) ((ISOMsg) ...
ProtectedLogListener implements LogListener, Configurable { public LogEvent log (LogEvent ev) { synchronized (ev.getPayLoad()) { final List<Object> payLoad = ev.getPayLoad(); int size = payLoad.size(); for (int i=0; i<size; i++) { Object obj = payLoad.get (i); if (obj instanceof ISOMsg) { ISOMsg m = (ISOMsg) ((ISOMsg) ...
ProtectedLogListener implements LogListener, Configurable { public LogEvent log (LogEvent ev) { synchronized (ev.getPayLoad()) { final List<Object> payLoad = ev.getPayLoad(); int size = payLoad.size(); for (int i=0; i<size; i++) { Object obj = payLoad.get (i); if (obj instanceof ISOMsg) { ISOMsg m = (ISOMsg) ((ISOMsg) ...
@Test public void testSetConfiguration() throws Throwable { ProtectedLogListener protectedLogListener = new ProtectedLogListener(); Configuration cfg = new SimpleConfiguration(); protectedLogListener.setConfiguration(cfg); assertEquals(0, protectedLogListener.protectFields.length, "protectedLogListener.protectFields.le...
public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; protectFields = ISOUtil.toStringArray (cfg.get ("protect", "")); wipeFields = ISOUtil.toStringArray (cfg.get ("wipe", "")); }
ProtectedLogListener implements LogListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; protectFields = ISOUtil.toStringArray (cfg.get ("protect", "")); wipeFields = ISOUtil.toStringArray (cfg.get ("wipe", "")); } }
ProtectedLogListener implements LogListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; protectFields = ISOUtil.toStringArray (cfg.get ("protect", "")); wipeFields = ISOUtil.toStringArray (cfg.get ("wipe", "")); } ProtectedLogListener(); }
ProtectedLogListener implements LogListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; protectFields = ISOUtil.toStringArray (cfg.get ("protect", "")); wipeFields = ISOUtil.toStringArray (cfg.get ("wipe", "")); } ProtectedLogListener(); void setConfi...
ProtectedLogListener implements LogListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; protectFields = ISOUtil.toStringArray (cfg.get ("protect", "")); wipeFields = ISOUtil.toStringArray (cfg.get ("wipe", "")); } ProtectedLogListener(); void setConfi...
@Test public void testSetConfigurationThrowsNullPointerException() throws Throwable { ProtectedLogListener protectedLogListener = new ProtectedLogListener(); Configuration cfg = new SubConfiguration(); try { protectedLogListener.setConfiguration(cfg); fail("Expected NullPointerException to be thrown"); } catch (NullPoi...
public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; protectFields = ISOUtil.toStringArray (cfg.get ("protect", "")); wipeFields = ISOUtil.toStringArray (cfg.get ("wipe", "")); }
ProtectedLogListener implements LogListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; protectFields = ISOUtil.toStringArray (cfg.get ("protect", "")); wipeFields = ISOUtil.toStringArray (cfg.get ("wipe", "")); } }
ProtectedLogListener implements LogListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; protectFields = ISOUtil.toStringArray (cfg.get ("protect", "")); wipeFields = ISOUtil.toStringArray (cfg.get ("wipe", "")); } ProtectedLogListener(); }
ProtectedLogListener implements LogListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; protectFields = ISOUtil.toStringArray (cfg.get ("protect", "")); wipeFields = ISOUtil.toStringArray (cfg.get ("wipe", "")); } ProtectedLogListener(); void setConfi...
ProtectedLogListener implements LogListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; protectFields = ISOUtil.toStringArray (cfg.get ("protect", "")); wipeFields = ISOUtil.toStringArray (cfg.get ("wipe", "")); } ProtectedLogListener(); void setConfi...
@Test public void testZipFile() throws Throwable { File testFile = File.createTempFile("testFile",".txt"); File testFileZip = File.createTempFile("testFile",".zip"); PrintWriter writer = new PrintWriter(testFile); writer.write("this is a test"); writer.close(); assertThat(testFile.exists(), is(true)); assertThat(testFi...
public static void zipFile(File input, File output) throws IOException { FileInputStream in = null; ZipOutputStream out = null; try { in = new FileInputStream(input); out = new ZipOutputStream(new FileOutputStream(output)); out.putNextEntry(new ZipEntry(input.getName())); byte[] buffer = new byte[4096]; int bytesRead; ...
ZipUtil { public static void zipFile(File input, File output) throws IOException { FileInputStream in = null; ZipOutputStream out = null; try { in = new FileInputStream(input); out = new ZipOutputStream(new FileOutputStream(output)); out.putNextEntry(new ZipEntry(input.getName())); byte[] buffer = new byte[4096]; int b...
ZipUtil { public static void zipFile(File input, File output) throws IOException { FileInputStream in = null; ZipOutputStream out = null; try { in = new FileInputStream(input); out = new ZipOutputStream(new FileOutputStream(output)); out.putNextEntry(new ZipEntry(input.getName())); byte[] buffer = new byte[4096]; int b...
ZipUtil { public static void zipFile(File input, File output) throws IOException { FileInputStream in = null; ZipOutputStream out = null; try { in = new FileInputStream(input); out = new ZipOutputStream(new FileOutputStream(output)); out.putNextEntry(new ZipEntry(input.getName())); byte[] buffer = new byte[4096]; int b...
ZipUtil { public static void zipFile(File input, File output) throws IOException { FileInputStream in = null; ZipOutputStream out = null; try { in = new FileInputStream(input); out = new ZipOutputStream(new FileOutputStream(output)); out.putNextEntry(new ZipEntry(input.getName())); byte[] buffer = new byte[4096]; int b...
@Test public void testToString() { String hexIAD = "0110250000044000DAC10000000000000000"; IssuerApplicationData iad = new IssuerApplicationData(hexIAD); assertEquals(hexIAD, iad.toString()); }
@Override public String toString() { return iad; }
IssuerApplicationData implements Loggeable { @Override public String toString() { return iad; } }
IssuerApplicationData implements Loggeable { @Override public String toString() { return iad; } IssuerApplicationData(String hexIAD); IssuerApplicationData(byte[] iad); }
IssuerApplicationData implements Loggeable { @Override public String toString() { return iad; } IssuerApplicationData(String hexIAD); IssuerApplicationData(byte[] iad); String getDerivationKeyIndex(); String getCryptogramVersionNumber(); String getCommonCoreIdentifier(); String getCardVerificationResults(); String get...
IssuerApplicationData implements Loggeable { @Override public String toString() { return iad; } IssuerApplicationData(String hexIAD); IssuerApplicationData(byte[] iad); String getDerivationKeyIndex(); String getCryptogramVersionNumber(); String getCommonCoreIdentifier(); String getCardVerificationResults(); String get...
@Test public void testBuildNull() { assertThrows(NullPointerException.class, () -> { instance.build(null); }); }
public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentException("The key block data ca...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
@Test public void testAppendInvalidThreeBytesTagLow() { assertThrows(IllegalArgumentException.class, () -> { instance.append(0x3f5fbf, new byte[0]); }); }
public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
@Test public void testBuildToShort() { assertThrows(IllegalArgumentException.class, () -> { String data = "10024V2TG17N00"; instance.build(data); }); }
public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentException("The key block data ca...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
@Test public void testBuildWithoutEncKey() { String data = "10024V2TG17N0033" + ISOUtil.hexString(KEYBLOCK_MAC8); ret = instance.build(data); assertEquals('1', ret.getKeyBlockVersion()); assertEquals(24, ret.getKeyBlockLength()); assertEquals(KeyUsage.VISAPVV, ret.getKeyUsage()); assertEquals(Algorithm.TDES, ret.getAlg...
public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentException("The key block data ca...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
@Test public void testBuildWithoutEncKeyAndMAC() { String data = "00016V2DN17N0033"; ret = instance.build(data); assertEquals('0', ret.getKeyBlockVersion()); assertEquals(16, ret.getKeyBlockLength()); assertEquals(KeyUsage.VISAPVV, ret.getKeyUsage()); assertEquals(Algorithm.DES, ret.getAlgorithm()); assertEquals(ModeOf...
public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentException("The key block data ca...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
@Test public void testBuildWithoutWithoutEncKey() { String data = "00020P0ANc4S0021" + ISOUtil.hexString(KEYBLOCK_MAC4); ret = instance.build(data); assertEquals('0', ret.getKeyBlockVersion()); assertEquals(20, ret.getKeyBlockLength()); assertEquals(KeyUsage.PINENC, ret.getKeyUsage()); assertEquals(Algorithm.AES, ret.g...
public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentException("The key block data ca...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
@Test public void testBuildMAC8() { String data = "00036V2RG17N0003" + ISOUtil.hexString(KEYBLOCK_ENCKEY) + ISOUtil.hexString(KEYBLOCK_MAC4); ret = instance.build(data); assertEquals('0', ret.getKeyBlockVersion()); assertEquals(36, ret.getKeyBlockLength()); assertEquals(KeyUsage.VISAPVV, ret.getKeyUsage()); assertEqual...
public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentException("The key block data ca...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
@Test public void testBuildWithOptHeaders() { String data = "D0046V2TGc3E0233" + OPTHEADER_KV + OPTHEADER_KS + ISOUtil.hexString(KEYBLOCK_MAC8); ret = instance.build(data); assertEquals('D', ret.getKeyBlockVersion()); assertEquals(46, ret.getKeyBlockLength()); assertNull(ret.getKeyBytes()); assertArrayEquals(KEYBLOCK_M...
public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentException("The key block data ca...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
@Test public void testBuildOptHeadersReversed() { String data = "E0046V2TGc3E0233" + OPTHEADER_KS + OPTHEADER_KV + ISOUtil.hexString(KEYBLOCK_MAC8); ret = instance.build(data); assertEquals('E', ret.getKeyBlockVersion()); assertEquals(46, ret.getKeyBlockLength()); assertNull(ret.getKeyBytes()); assertArrayEquals(KEYBLO...
public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentException("The key block data ca...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
SecureKeyBlockBuilder { public SecureKeyBlock build(CharSequence data) throws IllegalArgumentException { Objects.requireNonNull(data, "The key block data cannot be null"); SecureKeyBlock skb = new SecureKeyBlock(); String keyblock = data.toString(); if (keyblock.length() < SIZE_HEADER) throw new IllegalArgumentExceptio...
@Test public void testToKeyBlock() { String data = "E0046V2TGc3E0233" + OPTHEADER_KS + OPTHEADER_KV + ISOUtil.hexString(KEYBLOCK_MAC8); ret = instance.build(data); assertEquals(data, instance.toKeyBlock(ret)); }
public String toKeyBlock(SecureKeyBlock skb) { StringBuilder sb = new StringBuilder(); sb.append(skb.getKeyBlockVersion()); sb.append(String.format("%04d", skb.getKeyBlockLength())); sb.append(skb.getKeyUsage().getCode()); sb.append(skb.getAlgorithm().getCode()); sb.append(skb.getModeOfUse().getCode()); sb.append(skb.g...
SecureKeyBlockBuilder { public String toKeyBlock(SecureKeyBlock skb) { StringBuilder sb = new StringBuilder(); sb.append(skb.getKeyBlockVersion()); sb.append(String.format("%04d", skb.getKeyBlockLength())); sb.append(skb.getKeyUsage().getCode()); sb.append(skb.getAlgorithm().getCode()); sb.append(skb.getModeOfUse().get...
SecureKeyBlockBuilder { public String toKeyBlock(SecureKeyBlock skb) { StringBuilder sb = new StringBuilder(); sb.append(skb.getKeyBlockVersion()); sb.append(String.format("%04d", skb.getKeyBlockLength())); sb.append(skb.getKeyUsage().getCode()); sb.append(skb.getAlgorithm().getCode()); sb.append(skb.getModeOfUse().get...
SecureKeyBlockBuilder { public String toKeyBlock(SecureKeyBlock skb) { StringBuilder sb = new StringBuilder(); sb.append(skb.getKeyBlockVersion()); sb.append(String.format("%04d", skb.getKeyBlockLength())); sb.append(skb.getKeyUsage().getCode()); sb.append(skb.getAlgorithm().getCode()); sb.append(skb.getModeOfUse().get...
SecureKeyBlockBuilder { public String toKeyBlock(SecureKeyBlock skb) { StringBuilder sb = new StringBuilder(); sb.append(skb.getKeyBlockVersion()); sb.append(String.format("%04d", skb.getKeyBlockLength())); sb.append(skb.getKeyUsage().getCode()); sb.append(skb.getAlgorithm().getCode()); sb.append(skb.getModeOfUse().get...
@Test public void testGetKeyBytes() throws Throwable { SecureKey secureDESKey = new SecureDESKey(); byte[] keyBytes = new byte[0]; secureDESKey.setKeyBytes(keyBytes); byte[] result = secureDESKey.getKeyBytes(); assertSame(keyBytes, result, "result"); }
public byte[] getKeyBytes () { return keyBytes; }
SecureKey implements Serializable, Loggeable { public byte[] getKeyBytes () { return keyBytes; } }
SecureKey implements Serializable, Loggeable { public byte[] getKeyBytes () { return keyBytes; } }
SecureKey implements Serializable, Loggeable { public byte[] getKeyBytes () { return keyBytes; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyType(String keyType); St...
SecureKey implements Serializable, Loggeable { public byte[] getKeyBytes () { return keyBytes; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyType(String keyType); St...
@Test public void testGetKeyBytes1() throws Throwable { byte[] keyBytes = new byte[3]; byte[] result = new SecureDESKey((short) 100, "testSecureKeyKeyType", keyBytes, keyBytes).getKeyBytes(); assertSame(keyBytes, result, "result"); assertEquals((byte) 0, keyBytes[0], "keyBytes[0]"); }
public byte[] getKeyBytes () { return keyBytes; }
SecureKey implements Serializable, Loggeable { public byte[] getKeyBytes () { return keyBytes; } }
SecureKey implements Serializable, Loggeable { public byte[] getKeyBytes () { return keyBytes; } }
SecureKey implements Serializable, Loggeable { public byte[] getKeyBytes () { return keyBytes; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyType(String keyType); St...
SecureKey implements Serializable, Loggeable { public byte[] getKeyBytes () { return keyBytes; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyType(String keyType); St...
@Test public void testAppendInvalidThreeBytesTagHighEndFF() { assertThrows(IllegalArgumentException.class, () -> { instance.append(0x3fff04, new byte[0]); }); }
public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); }
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
TLVList implements Serializable, Loggeable { public void append(TLVMsg tlv) throws NullPointerException { Objects.requireNonNull(tlv, "TLV message cannot be null"); tags.add(tlv); } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void appe...
@Test public void testGetKeyLength() throws Throwable { SecureKey secureDESKey = new SecureDESKey(); secureDESKey.setKeyLength((short) 100); short result = secureDESKey.getKeyLength(); assertEquals((short) 100, result, "result"); }
public short getKeyLength () { return keyLength; }
SecureKey implements Serializable, Loggeable { public short getKeyLength () { return keyLength; } }
SecureKey implements Serializable, Loggeable { public short getKeyLength () { return keyLength; } }
SecureKey implements Serializable, Loggeable { public short getKeyLength () { return keyLength; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyType(String keyType); S...
SecureKey implements Serializable, Loggeable { public short getKeyLength () { return keyLength; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyType(String keyType); S...
@Test public void testGetKeyType() throws Throwable { SecureKey secureDESKey = new SecureDESKey(); secureDESKey.setKeyType("testSecureKeyKeyType"); String result = secureDESKey.getKeyType(); assertEquals("testSecureKeyKeyType", result, "result"); }
public String getKeyType () { return this.keyType; }
SecureKey implements Serializable, Loggeable { public String getKeyType () { return this.keyType; } }
SecureKey implements Serializable, Loggeable { public String getKeyType () { return this.keyType; } }
SecureKey implements Serializable, Loggeable { public String getKeyType () { return this.keyType; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyType(String keyType);...
SecureKey implements Serializable, Loggeable { public String getKeyType () { return this.keyType; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyType(String keyType);...
@Test public void testSetKeyBytes() throws Throwable { byte[] keyBytes = new byte[3]; SecureKey secureDESKey = new SecureDESKey((short) 100, "testSecureKeyKeyType", keyBytes, keyBytes); secureDESKey.setKeyBytes(keyBytes); assertSame(keyBytes, ((SecureDESKey) secureDESKey).keyBytes, "(SecureDESKey) secureDESKey.keyBytes...
public void setKeyBytes (byte[] keyBytes) { this.keyBytes = keyBytes; }
SecureKey implements Serializable, Loggeable { public void setKeyBytes (byte[] keyBytes) { this.keyBytes = keyBytes; } }
SecureKey implements Serializable, Loggeable { public void setKeyBytes (byte[] keyBytes) { this.keyBytes = keyBytes; } }
SecureKey implements Serializable, Loggeable { public void setKeyBytes (byte[] keyBytes) { this.keyBytes = keyBytes; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyTy...
SecureKey implements Serializable, Loggeable { public void setKeyBytes (byte[] keyBytes) { this.keyBytes = keyBytes; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyTy...
@Test public void testSetKeyLength() throws Throwable { byte[] keyBytes = new byte[3]; new SecureDESKey((short) 100, "testSecureKeyKeyType", keyBytes, keyBytes).getKeyBytes(); SecureKey secureDESKey = new SecureDESKey((short) 1000, "testSecureKeyKeyType1", "3check-value>".getBytes(), keyBytes); secureDESKey.setKeyLengt...
public void setKeyLength (short keyLength) { this.keyLength = keyLength; }
SecureKey implements Serializable, Loggeable { public void setKeyLength (short keyLength) { this.keyLength = keyLength; } }
SecureKey implements Serializable, Loggeable { public void setKeyLength (short keyLength) { this.keyLength = keyLength; } }
SecureKey implements Serializable, Loggeable { public void setKeyLength (short keyLength) { this.keyLength = keyLength; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKe...
SecureKey implements Serializable, Loggeable { public void setKeyLength (short keyLength) { this.keyLength = keyLength; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKe...
@Test public void testSetKeyType() throws Throwable { byte[] keyBytes = new byte[3]; new SecureDESKey((short) 100, "testSecureKeyKeyType", keyBytes, keyBytes).getKeyBytes(); SecureKey secureDESKey = new SecureDESKey((short) 1000, "testSecureKeyKeyType1", "3check-value>".getBytes(), keyBytes); secureDESKey.setKeyType("t...
public void setKeyType (String keyType) { this.keyType = keyType; }
SecureKey implements Serializable, Loggeable { public void setKeyType (String keyType) { this.keyType = keyType; } }
SecureKey implements Serializable, Loggeable { public void setKeyType (String keyType) { this.keyType = keyType; } }
SecureKey implements Serializable, Loggeable { public void setKeyType (String keyType) { this.keyType = keyType; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyType(S...
SecureKey implements Serializable, Loggeable { public void setKeyType (String keyType) { this.keyType = keyType; } void setKeyBytes(byte[] keyBytes); byte[] getKeyBytes(); void setKeyCheckValue(byte[] keyCheckValue); byte[] getKeyCheckValue(); void setKeyLength(short keyLength); short getKeyLength(); void setKeyType(S...
@Test public void testDecryptPINImplThrowsSMException() throws Throwable { BaseSMAdapter baseSMAdapter = new BaseSMAdapter(); try { baseSMAdapter.decryptPINImpl(new EncryptedPIN()); fail("Expected SMException to be thrown"); } catch (SMException ex) { assertEquals("Operation not supported in: org.jpos.security.BaseSMAd...
protected String decryptPINImpl (EncryptedPIN pinUnderLmk) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected String decryptPINImpl (EncryptedPIN pinUnderLmk) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected String decryptPINImpl (EncryptedPIN pinUnderLmk) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected String decryptPINImpl (EncryptedPIN pinUnderLmk) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @Override...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected String decryptPINImpl (EncryptedPIN pinUnderLmk) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @Override...
@Test public void testEncryptPINThrowsNullPointerException2() throws Throwable { try { new BaseSMAdapter().encryptPIN("testBaseSMAdapterPin", null); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()");...
@Override public EncryptedPIN encryptPIN (String pin, String accountNumber, boolean extract) throws SMException { accountNumber = extract ? EncryptedPIN.extractAccountNumberPart(accountNumber) : accountNumber; List<Loggeable> cmdParameters = new ArrayList<>(); cmdParameters.add(new SimpleMsg("parameter", "clear pin", p...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public EncryptedPIN encryptPIN (String pin, String accountNumber, boolean extract) throws SMException { accountNumber = extract ? EncryptedPIN.extractAccountNumberPart(accountNumber) : accountNumber; List<Loggeable> cmdParameters = new ArrayList...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public EncryptedPIN encryptPIN (String pin, String accountNumber, boolean extract) throws SMException { accountNumber = extract ? EncryptedPIN.extractAccountNumberPart(accountNumber) : accountNumber; List<Loggeable> cmdParameters = new ArrayList...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public EncryptedPIN encryptPIN (String pin, String accountNumber, boolean extract) throws SMException { accountNumber = extract ? EncryptedPIN.extractAccountNumberPart(accountNumber) : accountNumber; List<Loggeable> cmdParameters = new ArrayList...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public EncryptedPIN encryptPIN (String pin, String accountNumber, boolean extract) throws SMException { accountNumber = extract ? EncryptedPIN.extractAccountNumberPart(accountNumber) : accountNumber; List<Loggeable> cmdParameters = new ArrayList...
@Test public void testExportKeyImplThrowsSMException() throws Throwable { BaseSMAdapter baseSMAdapter = new BaseSMAdapter(); byte[] keyBytes = new byte[1]; try { baseSMAdapter .exportKeyImpl(new SecureDESKey((short) 100, "testBaseSMAdapterKeyType", keyBytes, "testString".getBytes()), new SecureDESKey()); fail("Expected...
protected byte[] exportKeyImpl(SecureDESKey key, SecureDESKey kek) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected byte[] exportKeyImpl(SecureDESKey key, SecureDESKey kek) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected byte[] exportKeyImpl(SecureDESKey key, SecureDESKey kek) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected byte[] exportKeyImpl(SecureDESKey key, SecureDESKey kek) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected byte[] exportKeyImpl(SecureDESKey key, SecureDESKey kek) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @...
@Test public void testExportPINImplThrowsSMException() throws Throwable { BaseSMAdapter baseSMAdapter = new BaseSMAdapter(); try { baseSMAdapter.exportPINImpl(new EncryptedPIN(), new SecureDESKey((short) 100, "testBaseSMAdapterKeyType", "testString".getBytes(), "".getBytes()), (byte) 0); fail("Expected SMException to b...
protected EncryptedPIN exportPINImpl(EncryptedPIN pinUnderLmk, T kd2, byte destinationPINBlockFormat) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected EncryptedPIN exportPINImpl(EncryptedPIN pinUnderLmk, T kd2, byte destinationPINBlockFormat) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected EncryptedPIN exportPINImpl(EncryptedPIN pinUnderLmk, T kd2, byte destinationPINBlockFormat) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration c...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected EncryptedPIN exportPINImpl(EncryptedPIN pinUnderLmk, T kd2, byte destinationPINBlockFormat) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration c...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected EncryptedPIN exportPINImpl(EncryptedPIN pinUnderLmk, T kd2, byte destinationPINBlockFormat) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration c...
@Test public void testGenerateCBC_MACImplThrowsSMException() throws Throwable { BaseSMAdapter jCESecurityModule = new BaseSMAdapter(); byte[] data = new byte[2]; try { jCESecurityModule.generateCBC_MACImpl(data, new SecureDESKey()); fail("Expected SMException to be thrown"); } catch (SMException ex) { assertEquals("Ope...
protected byte[] generateCBC_MACImpl(byte[] data, T kd) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected byte[] generateCBC_MACImpl(byte[] data, T kd) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected byte[] generateCBC_MACImpl(byte[] data, T kd) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected byte[] generateCBC_MACImpl(byte[] data, T kd) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @Override vo...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected byte[] generateCBC_MACImpl(byte[] data, T kd) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @Override vo...
@Test public void testConstructor() { instance = new TLVList(); assertTrue(instance.getTags().isEmpty()); }
public List<TLVMsg> getTags() { return tags; }
TLVList implements Serializable, Loggeable { public List<TLVMsg> getTags() { return tags; } }
TLVList implements Serializable, Loggeable { public List<TLVMsg> getTags() { return tags; } TLVList(); }
TLVList implements Serializable, Loggeable { public List<TLVMsg> getTags() { return tags; } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void append(TLVMsg tlv); TLVList append(int tag, byte[] value); TLVList append(int tag, String valu...
TLVList implements Serializable, Loggeable { public List<TLVMsg> getTags() { return tags; } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void append(TLVMsg tlv); TLVList append(int tag, byte[] value); TLVList append(int tag, String valu...
@Test public void testGetL4() { byte[] value = new byte[0x7ff7]; byte[] result = tl.createTLVMsg(TEST_TAG1, value).getL(); assertArrayEquals(ISOUtil.hex2byte("827FF7"), result); }
public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBytes); rBytes[0] = (byte) (0x80...
TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy...
TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy...
TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy...
TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy...
@Test public void testGenerateCBC_MACThrowsSMException1() throws Throwable { assertThrows(SMException.class, () -> { new BaseSMAdapter().generateCBC_MAC(null, new SecureDESKey((short) 100, "testBaseSMAdapterKeyType", "testBaseSMAdapterKeyHexString1", "testBaseSMAdapterKeyCheckValueHexString1")); }); }
@Override public byte[] generateCBC_MAC(byte[] data, T kd) throws SMException { List<Loggeable> cmdParameters = new ArrayList<>(); cmdParameters.add(new SimpleMsg("parameter", "data", data)); cmdParameters.add(new SimpleMsg("parameter", "data key", kd)); LogEvent evt = new LogEvent(this, "s-m-operation"); evt.addMessag...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public byte[] generateCBC_MAC(byte[] data, T kd) throws SMException { List<Loggeable> cmdParameters = new ArrayList<>(); cmdParameters.add(new SimpleMsg("parameter", "data", data)); cmdParameters.add(new SimpleMsg("parameter", "data key", kd)); ...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public byte[] generateCBC_MAC(byte[] data, T kd) throws SMException { List<Loggeable> cmdParameters = new ArrayList<>(); cmdParameters.add(new SimpleMsg("parameter", "data", data)); cmdParameters.add(new SimpleMsg("parameter", "data key", kd)); ...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public byte[] generateCBC_MAC(byte[] data, T kd) throws SMException { List<Loggeable> cmdParameters = new ArrayList<>(); cmdParameters.add(new SimpleMsg("parameter", "data", data)); cmdParameters.add(new SimpleMsg("parameter", "data key", kd)); ...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public byte[] generateCBC_MAC(byte[] data, T kd) throws SMException { List<Loggeable> cmdParameters = new ArrayList<>(); cmdParameters.add(new SimpleMsg("parameter", "data", data)); cmdParameters.add(new SimpleMsg("parameter", "data key", kd)); ...
@Test public void testGenerateKeyImplThrowsSMException() throws Throwable { BaseSMAdapter baseSMAdapter = new BaseSMAdapter(); try { baseSMAdapter.generateKeyImpl((short) 100, "testBaseSMAdapterKeyType"); fail("Expected SMException to be thrown"); } catch (SMException ex) { assertEquals("Operation not supported in: org...
protected SecureDESKey generateKeyImpl (short keyLength, String keyType) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected SecureDESKey generateKeyImpl (short keyLength, String keyType) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected SecureDESKey generateKeyImpl (short keyLength, String keyType) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String rea...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected SecureDESKey generateKeyImpl (short keyLength, String keyType) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String rea...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { protected SecureDESKey generateKeyImpl (short keyLength, String keyType) throws SMException { throw new SMException("Operation not supported in: " + this.getClass().getName()); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String rea...
@Test public void testGetLogger() throws Throwable { BaseSMAdapter baseSMAdapter = new BaseSMAdapter(); Logger logger = Logger.getLogger("testBaseSMAdapterName"); baseSMAdapter.setLogger(logger, "testBaseSMAdapterRealm"); Logger result = baseSMAdapter.getLogger(); assertSame(logger, result, "result"); }
@Override public Logger getLogger () { return logger; }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public Logger getLogger () { return logger; } }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public Logger getLogger () { return logger; } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public Logger getLogger () { return logger; } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @Override void setConfiguration(Configuration cfg); @Override void setLogger(Logger logger, String realm); @Override L...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public Logger getLogger () { return logger; } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @Override void setConfiguration(Configuration cfg); @Override void setLogger(Logger logger, String realm); @Override L...
@Test public void testGetRealm() throws Throwable { BaseSMAdapter jCESecurityModule = new BaseSMAdapter(); jCESecurityModule.setLogger(new Logger(), "testBaseSMAdapterRealm"); String result = jCESecurityModule.getRealm(); assertEquals("testBaseSMAdapterRealm", result, "result"); }
@Override public String getRealm () { return realm; }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public String getRealm () { return realm; } }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public String getRealm () { return realm; } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public String getRealm () { return realm; } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @Override void setConfiguration(Configuration cfg); @Override void setLogger(Logger logger, String realm); @Override Log...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { @Override public String getRealm () { return realm; } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @Override void setConfiguration(Configuration cfg); @Override void setLogger(Logger logger, String realm); @Override Log...
@Test public void testGetSMAdapter() throws Throwable { BaseSMAdapter jCESecurityModule = new BaseSMAdapter(); jCESecurityModule.setName("testString"); BaseSMAdapter result = (BaseSMAdapter) BaseSMAdapter.getSMAdapter("testString"); assertSame(jCESecurityModule, result, "result"); }
public static SMAdapter getSMAdapter (String name) throws NameRegistrar.NotFoundException { return (SMAdapter)NameRegistrar.get("s-m-adapter." + name); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { public static SMAdapter getSMAdapter (String name) throws NameRegistrar.NotFoundException { return (SMAdapter)NameRegistrar.get("s-m-adapter." + name); } }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { public static SMAdapter getSMAdapter (String name) throws NameRegistrar.NotFoundException { return (SMAdapter)NameRegistrar.get("s-m-adapter." + name); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); }
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { public static SMAdapter getSMAdapter (String name) throws NameRegistrar.NotFoundException { return (SMAdapter)NameRegistrar.get("s-m-adapter." + name); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @Override void setCo...
BaseSMAdapter implements SMAdapter<T>, Configurable, LogSource { public static SMAdapter getSMAdapter (String name) throws NameRegistrar.NotFoundException { return (SMAdapter)NameRegistrar.get("s-m-adapter." + name); } BaseSMAdapter(); BaseSMAdapter(Configuration cfg, Logger logger, String realm); @Override void setCo...