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 testEOFException() throws IOException { final ByteArrayInputStream input = new ByteArrayInputStream(new byte[] {}); try { EndianUtils.readSwappedDouble(input); fail("Expected EOFException"); } catch (final EOFException e) { } }
public static double readSwappedDouble(final byte[] data, final int offset) { return Double.longBitsToDouble( readSwappedLong( data, offset ) ); }
EndianUtils { public static double readSwappedDouble(final byte[] data, final int offset) { return Double.longBitsToDouble( readSwappedLong( data, offset ) ); } }
EndianUtils { public static double readSwappedDouble(final byte[] data, final int offset) { return Double.longBitsToDouble( readSwappedLong( data, offset ) ); } EndianUtils(); }
EndianUtils { public static double readSwappedDouble(final byte[] data, final int offset) { return Double.longBitsToDouble( readSwappedLong( data, offset ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFlo...
EndianUtils { public static double readSwappedDouble(final byte[] data, final int offset) { return Double.longBitsToDouble( readSwappedLong( data, offset ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFlo...
@Test public void testSwapShort() { assertEquals( (short) 0, EndianUtils.swapShort( (short) 0 ) ); assertEquals( (short) 0x0201, EndianUtils.swapShort( (short) 0x0102 ) ); assertEquals( (short) 0xffff, EndianUtils.swapShort( (short) 0xffff ) ); assertEquals( (short) 0x0102, EndianUtils.swapShort( (short) 0x0201 ) ); }
public static short swapShort(final short value) { return (short) ( ( ( ( value >> 0 ) & 0xff ) << 8 ) + ( ( ( value >> 8 ) & 0xff ) << 0 ) ); }
EndianUtils { public static short swapShort(final short value) { return (short) ( ( ( ( value >> 0 ) & 0xff ) << 8 ) + ( ( ( value >> 8 ) & 0xff ) << 0 ) ); } }
EndianUtils { public static short swapShort(final short value) { return (short) ( ( ( ( value >> 0 ) & 0xff ) << 8 ) + ( ( ( value >> 8 ) & 0xff ) << 0 ) ); } EndianUtils(); }
EndianUtils { public static short swapShort(final short value) { return (short) ( ( ( ( value >> 0 ) & 0xff ) << 8 ) + ( ( ( value >> 8 ) & 0xff ) << 0 ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFloat...
EndianUtils { public static short swapShort(final short value) { return (short) ( ( ( ( value >> 0 ) & 0xff ) << 8 ) + ( ( ( value >> 8 ) & 0xff ) << 0 ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFloat...
@Test public void testSwapInteger() { assertEquals( 0, EndianUtils.swapInteger( 0 ) ); assertEquals( 0x04030201, EndianUtils.swapInteger( 0x01020304 ) ); assertEquals( 0x01000000, EndianUtils.swapInteger( 0x00000001 ) ); assertEquals( 0x00000001, EndianUtils.swapInteger( 0x01000000 ) ); assertEquals( 0x11111111, Endian...
public static int swapInteger(final int value) { return ( ( ( value >> 0 ) & 0xff ) << 24 ) + ( ( ( value >> 8 ) & 0xff ) << 16 ) + ( ( ( value >> 16 ) & 0xff ) << 8 ) + ( ( ( value >> 24 ) & 0xff ) << 0 ); }
EndianUtils { public static int swapInteger(final int value) { return ( ( ( value >> 0 ) & 0xff ) << 24 ) + ( ( ( value >> 8 ) & 0xff ) << 16 ) + ( ( ( value >> 16 ) & 0xff ) << 8 ) + ( ( ( value >> 24 ) & 0xff ) << 0 ); } }
EndianUtils { public static int swapInteger(final int value) { return ( ( ( value >> 0 ) & 0xff ) << 24 ) + ( ( ( value >> 8 ) & 0xff ) << 16 ) + ( ( ( value >> 16 ) & 0xff ) << 8 ) + ( ( ( value >> 24 ) & 0xff ) << 0 ); } EndianUtils(); }
EndianUtils { public static int swapInteger(final int value) { return ( ( ( value >> 0 ) & 0xff ) << 24 ) + ( ( ( value >> 8 ) & 0xff ) << 16 ) + ( ( ( value >> 16 ) & 0xff ) << 8 ) + ( ( ( value >> 24 ) & 0xff ) << 0 ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value)...
EndianUtils { public static int swapInteger(final int value) { return ( ( ( value >> 0 ) & 0xff ) << 24 ) + ( ( ( value >> 8 ) & 0xff ) << 16 ) + ( ( ( value >> 16 ) & 0xff ) << 8 ) + ( ( ( value >> 24 ) & 0xff ) << 0 ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value)...
@Test public void testSwapLong() { assertEquals( 0, EndianUtils.swapLong( 0 ) ); assertEquals( 0x0807060504030201L, EndianUtils.swapLong( 0x0102030405060708L ) ); assertEquals( 0xffffffffffffffffL, EndianUtils.swapLong( 0xffffffffffffffffL ) ); assertEquals( 0xab, EndianUtils.swapLong( 0xab00000000000000L ) ); }
public static long swapLong(final long value) { return ( ( ( value >> 0 ) & 0xff ) << 56 ) + ( ( ( value >> 8 ) & 0xff ) << 48 ) + ( ( ( value >> 16 ) & 0xff ) << 40 ) + ( ( ( value >> 24 ) & 0xff ) << 32 ) + ( ( ( value >> 32 ) & 0xff ) << 24 ) + ( ( ( value >> 40 ) & 0xff ) << 16 ) + ( ( ( value >> 48 ) & 0xff ) << 8...
EndianUtils { public static long swapLong(final long value) { return ( ( ( value >> 0 ) & 0xff ) << 56 ) + ( ( ( value >> 8 ) & 0xff ) << 48 ) + ( ( ( value >> 16 ) & 0xff ) << 40 ) + ( ( ( value >> 24 ) & 0xff ) << 32 ) + ( ( ( value >> 32 ) & 0xff ) << 24 ) + ( ( ( value >> 40 ) & 0xff ) << 16 ) + ( ( ( value >> 48 )...
EndianUtils { public static long swapLong(final long value) { return ( ( ( value >> 0 ) & 0xff ) << 56 ) + ( ( ( value >> 8 ) & 0xff ) << 48 ) + ( ( ( value >> 16 ) & 0xff ) << 40 ) + ( ( ( value >> 24 ) & 0xff ) << 32 ) + ( ( ( value >> 32 ) & 0xff ) << 24 ) + ( ( ( value >> 40 ) & 0xff ) << 16 ) + ( ( ( value >> 48 )...
EndianUtils { public static long swapLong(final long value) { return ( ( ( value >> 0 ) & 0xff ) << 56 ) + ( ( ( value >> 8 ) & 0xff ) << 48 ) + ( ( ( value >> 16 ) & 0xff ) << 40 ) + ( ( ( value >> 24 ) & 0xff ) << 32 ) + ( ( ( value >> 32 ) & 0xff ) << 24 ) + ( ( ( value >> 40 ) & 0xff ) << 16 ) + ( ( ( value >> 48 )...
EndianUtils { public static long swapLong(final long value) { return ( ( ( value >> 0 ) & 0xff ) << 56 ) + ( ( ( value >> 8 ) & 0xff ) << 48 ) + ( ( ( value >> 16 ) & 0xff ) << 40 ) + ( ( ( value >> 24 ) & 0xff ) << 32 ) + ( ( ( value >> 32 ) & 0xff ) << 24 ) + ( ( ( value >> 40 ) & 0xff ) << 16 ) + ( ( ( value >> 48 )...
@Test public void testSwapFloat() { assertEquals( 0.0f, EndianUtils.swapFloat( 0.0f ), 0.0 ); final float f1 = Float.intBitsToFloat( 0x01020304 ); final float f2 = Float.intBitsToFloat( 0x04030201 ); assertEquals( f2, EndianUtils.swapFloat( f1 ), 0.0 ); }
public static float swapFloat(final float value) { return Float.intBitsToFloat( swapInteger( Float.floatToIntBits( value ) ) ); }
EndianUtils { public static float swapFloat(final float value) { return Float.intBitsToFloat( swapInteger( Float.floatToIntBits( value ) ) ); } }
EndianUtils { public static float swapFloat(final float value) { return Float.intBitsToFloat( swapInteger( Float.floatToIntBits( value ) ) ); } EndianUtils(); }
EndianUtils { public static float swapFloat(final float value) { return Float.intBitsToFloat( swapInteger( Float.floatToIntBits( value ) ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFloat(final float va...
EndianUtils { public static float swapFloat(final float value) { return Float.intBitsToFloat( swapInteger( Float.floatToIntBits( value ) ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFloat(final float va...
@Test public void testSwapDouble() { assertEquals( 0.0, EndianUtils.swapDouble( 0.0 ), 0.0 ); final double d1 = Double.longBitsToDouble( 0x0102030405060708L ); final double d2 = Double.longBitsToDouble( 0x0807060504030201L ); assertEquals( d2, EndianUtils.swapDouble( d1 ), 0.0 ); }
public static double swapDouble(final double value) { return Double.longBitsToDouble( swapLong( Double.doubleToLongBits( value ) ) ); }
EndianUtils { public static double swapDouble(final double value) { return Double.longBitsToDouble( swapLong( Double.doubleToLongBits( value ) ) ); } }
EndianUtils { public static double swapDouble(final double value) { return Double.longBitsToDouble( swapLong( Double.doubleToLongBits( value ) ) ); } EndianUtils(); }
EndianUtils { public static double swapDouble(final double value) { return Double.longBitsToDouble( swapLong( Double.doubleToLongBits( value ) ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFloat(final fl...
EndianUtils { public static double swapDouble(final double value) { return Double.longBitsToDouble( swapLong( Double.doubleToLongBits( value ) ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFloat(final fl...
@Test public void eq() { String h = "<p>Hello<p>there<p>world"; Document doc = Jsoup.parse(h); assertEquals("there", doc.select("p").eq(1).text()); assertEquals("there", doc.select("p").get(1).text()); }
public Elements eq(int index) { return size() > index ? new Elements(get(index)) : new Elements(); }
Elements extends ArrayList<Element> { public Elements eq(int index) { return size() > index ? new Elements(get(index)) : new Elements(); } }
Elements extends ArrayList<Element> { public Elements eq(int index) { return size() > index ? new Elements(get(index)) : new Elements(); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); Elements(Element... elements); }
Elements extends ArrayList<Element> { public Elements eq(int index) { return size() > index ? new Elements(get(index)) : new Elements(); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); Elements(Element... elements); @Override Elements clone(); S...
Elements extends ArrayList<Element> { public Elements eq(int index) { return size() > index ? new Elements(get(index)) : new Elements(); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); Elements(Element... elements); @Override Elements clone(); S...
@Test public void testReadSwappedShort() throws IOException { final byte[] bytes = new byte[] { 0x02, 0x01 }; assertEquals( 0x0102, EndianUtils.readSwappedShort( bytes, 0 ) ); final ByteArrayInputStream input = new ByteArrayInputStream(bytes); assertEquals( 0x0102, EndianUtils.readSwappedShort( input ) ); }
public static short readSwappedShort(final byte[] data, final int offset) { return (short)( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) ); }
EndianUtils { public static short readSwappedShort(final byte[] data, final int offset) { return (short)( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) ); } }
EndianUtils { public static short readSwappedShort(final byte[] data, final int offset) { return (short)( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) ); } EndianUtils(); }
EndianUtils { public static short readSwappedShort(final byte[] data, final int offset) { return (short)( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final lon...
EndianUtils { public static short readSwappedShort(final byte[] data, final int offset) { return (short)( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final lon...
@Test public void testWriteSwappedShort() throws IOException { byte[] bytes = new byte[2]; EndianUtils.writeSwappedShort( bytes, 0, (short) 0x0102 ); assertEquals( 0x02, bytes[0] ); assertEquals( 0x01, bytes[1] ); final ByteArrayOutputStream baos = new ByteArrayOutputStream(2); EndianUtils.writeSwappedShort( baos, (sho...
public static void writeSwappedShort(final byte[] data, final int offset, final short value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); }
EndianUtils { public static void writeSwappedShort(final byte[] data, final int offset, final short value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); } }
EndianUtils { public static void writeSwappedShort(final byte[] data, final int offset, final short value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); } EndianUtils(); }
EndianUtils { public static void writeSwappedShort(final byte[] data, final int offset, final short value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); st...
EndianUtils { public static void writeSwappedShort(final byte[] data, final int offset, final short value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); st...
@Test public void testReadSwappedUnsignedShort() throws IOException { final byte[] bytes = new byte[] { 0x02, 0x01 }; assertEquals( 0x00000102, EndianUtils.readSwappedUnsignedShort( bytes, 0 ) ); final ByteArrayInputStream input = new ByteArrayInputStream(bytes); assertEquals( 0x00000102, EndianUtils.readSwappedUnsigne...
public static int readSwappedUnsignedShort(final byte[] data, final int offset) { return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) ); }
EndianUtils { public static int readSwappedUnsignedShort(final byte[] data, final int offset) { return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) ); } }
EndianUtils { public static int readSwappedUnsignedShort(final byte[] data, final int offset) { return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) ); } EndianUtils(); }
EndianUtils { public static int readSwappedUnsignedShort(final byte[] data, final int offset) { return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long...
EndianUtils { public static int readSwappedUnsignedShort(final byte[] data, final int offset) { return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long...
@Test public void testReadSwappedInteger() throws IOException { final byte[] bytes = new byte[] { 0x04, 0x03, 0x02, 0x01 }; assertEquals( 0x01020304, EndianUtils.readSwappedInteger( bytes, 0 ) ); final ByteArrayInputStream input = new ByteArrayInputStream(bytes); assertEquals( 0x01020304, EndianUtils.readSwappedInteger...
public static int readSwappedInteger(final byte[] data, final int offset) { return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) + ( ( data[ offset + 3 ] & 0xff ) << 24 ) ); }
EndianUtils { public static int readSwappedInteger(final byte[] data, final int offset) { return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) + ( ( data[ offset + 3 ] & 0xff ) << 24 ) ); } }
EndianUtils { public static int readSwappedInteger(final byte[] data, final int offset) { return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) + ( ( data[ offset + 3 ] & 0xff ) << 24 ) ); } EndianUtils(); }
EndianUtils { public static int readSwappedInteger(final byte[] data, final int offset) { return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) + ( ( data[ offset + 3 ] & 0xff ) << 24 ) ); } EndianUtils(); static short swapShort(final short va...
EndianUtils { public static int readSwappedInteger(final byte[] data, final int offset) { return ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) + ( ( data[ offset + 3 ] & 0xff ) << 24 ) ); } EndianUtils(); static short swapShort(final short va...
@Test public void testWriteSwappedInteger() throws IOException { byte[] bytes = new byte[4]; EndianUtils.writeSwappedInteger( bytes, 0, 0x01020304 ); assertEquals( 0x04, bytes[0] ); assertEquals( 0x03, bytes[1] ); assertEquals( 0x02, bytes[2] ); assertEquals( 0x01, bytes[3] ); final ByteArrayOutputStream baos = new Byt...
public static void writeSwappedInteger(final byte[] data, final int offset, final int value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff ); data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0xff ); }
EndianUtils { public static void writeSwappedInteger(final byte[] data, final int offset, final int value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff ); data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0...
EndianUtils { public static void writeSwappedInteger(final byte[] data, final int offset, final int value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff ); data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0...
EndianUtils { public static void writeSwappedInteger(final byte[] data, final int offset, final int value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff ); data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0...
EndianUtils { public static void writeSwappedInteger(final byte[] data, final int offset, final int value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff ); data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0...
@Test public void testReadSwappedUnsignedInteger() throws IOException { final byte[] bytes = new byte[] { 0x04, 0x03, 0x02, 0x01 }; assertEquals( 0x0000000001020304L, EndianUtils.readSwappedUnsignedInteger( bytes, 0 ) ); final ByteArrayInputStream input = new ByteArrayInputStream(bytes); assertEquals( 0x000000000102030...
public static long readSwappedUnsignedInteger(final byte[] data, final int offset) { final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) ); final long high = data[ offset + 3 ] & 0xff; return (high << 24) + (0xffffffffL & low); }
EndianUtils { public static long readSwappedUnsignedInteger(final byte[] data, final int offset) { final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) ); final long high = data[ offset + 3 ] & 0xff; return (high << 24) + (0xfffffff...
EndianUtils { public static long readSwappedUnsignedInteger(final byte[] data, final int offset) { final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) ); final long high = data[ offset + 3 ] & 0xff; return (high << 24) + (0xfffffff...
EndianUtils { public static long readSwappedUnsignedInteger(final byte[] data, final int offset) { final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) ); final long high = data[ offset + 3 ] & 0xff; return (high << 24) + (0xfffffff...
EndianUtils { public static long readSwappedUnsignedInteger(final byte[] data, final int offset) { final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) ); final long high = data[ offset + 3 ] & 0xff; return (high << 24) + (0xfffffff...
@Test public void testReadSwappedLong() throws IOException { final byte[] bytes = new byte[] { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01 }; assertEquals( 0x0102030405060708L, EndianUtils.readSwappedLong( bytes, 0 ) ); final ByteArrayInputStream input = new ByteArrayInputStream(bytes); assertEquals( 0x0102030405060...
public static long readSwappedLong(final byte[] data, final int offset) { final long low = readSwappedInteger(data, offset); final long high = readSwappedInteger(data, offset + 4); return (high << 32) + (0xffffffffL & low); }
EndianUtils { public static long readSwappedLong(final byte[] data, final int offset) { final long low = readSwappedInteger(data, offset); final long high = readSwappedInteger(data, offset + 4); return (high << 32) + (0xffffffffL & low); } }
EndianUtils { public static long readSwappedLong(final byte[] data, final int offset) { final long low = readSwappedInteger(data, offset); final long high = readSwappedInteger(data, offset + 4); return (high << 32) + (0xffffffffL & low); } EndianUtils(); }
EndianUtils { public static long readSwappedLong(final byte[] data, final int offset) { final long low = readSwappedInteger(data, offset); final long high = readSwappedInteger(data, offset + 4); return (high << 32) + (0xffffffffL & low); } EndianUtils(); static short swapShort(final short value); static int swapInteger...
EndianUtils { public static long readSwappedLong(final byte[] data, final int offset) { final long low = readSwappedInteger(data, offset); final long high = readSwappedInteger(data, offset + 4); return (high << 32) + (0xffffffffL & low); } EndianUtils(); static short swapShort(final short value); static int swapInteger...
@Test public void testWriteSwappedLong() throws IOException { byte[] bytes = new byte[8]; EndianUtils.writeSwappedLong( bytes, 0, 0x0102030405060708L ); assertEquals( 0x08, bytes[0] ); assertEquals( 0x07, bytes[1] ); assertEquals( 0x06, bytes[2] ); assertEquals( 0x05, bytes[3] ); assertEquals( 0x04, bytes[4] ); assertE...
public static void writeSwappedLong(final byte[] data, final int offset, final long value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff ); data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0xff ); data[ off...
EndianUtils { public static void writeSwappedLong(final byte[] data, final int offset, final long value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff ); data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0xf...
EndianUtils { public static void writeSwappedLong(final byte[] data, final int offset, final long value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff ); data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0xf...
EndianUtils { public static void writeSwappedLong(final byte[] data, final int offset, final long value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff ); data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0xf...
EndianUtils { public static void writeSwappedLong(final byte[] data, final int offset, final long value) { data[ offset + 0 ] = (byte)( ( value >> 0 ) & 0xff ); data[ offset + 1 ] = (byte)( ( value >> 8 ) & 0xff ); data[ offset + 2 ] = (byte)( ( value >> 16 ) & 0xff ); data[ offset + 3 ] = (byte)( ( value >> 24 ) & 0xf...
@Test public void testReadSwappedFloat() throws IOException { final byte[] bytes = new byte[] { 0x04, 0x03, 0x02, 0x01 }; final float f1 = Float.intBitsToFloat( 0x01020304 ); final float f2 = EndianUtils.readSwappedFloat( bytes, 0 ); assertEquals( f1, f2, 0.0 ); final ByteArrayInputStream input = new ByteArrayInputStre...
public static float readSwappedFloat(final byte[] data, final int offset) { return Float.intBitsToFloat( readSwappedInteger( data, offset ) ); }
EndianUtils { public static float readSwappedFloat(final byte[] data, final int offset) { return Float.intBitsToFloat( readSwappedInteger( data, offset ) ); } }
EndianUtils { public static float readSwappedFloat(final byte[] data, final int offset) { return Float.intBitsToFloat( readSwappedInteger( data, offset ) ); } EndianUtils(); }
EndianUtils { public static float readSwappedFloat(final byte[] data, final int offset) { return Float.intBitsToFloat( readSwappedInteger( data, offset ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFloat...
EndianUtils { public static float readSwappedFloat(final byte[] data, final int offset) { return Float.intBitsToFloat( readSwappedInteger( data, offset ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFloat...
@Test public void testWriteSwappedFloat() throws IOException { byte[] bytes = new byte[4]; final float f1 = Float.intBitsToFloat( 0x01020304 ); EndianUtils.writeSwappedFloat( bytes, 0, f1 ); assertEquals( 0x04, bytes[0] ); assertEquals( 0x03, bytes[1] ); assertEquals( 0x02, bytes[2] ); assertEquals( 0x01, bytes[3] ); f...
public static void writeSwappedFloat(final byte[] data, final int offset, final float value) { writeSwappedInteger( data, offset, Float.floatToIntBits( value ) ); }
EndianUtils { public static void writeSwappedFloat(final byte[] data, final int offset, final float value) { writeSwappedInteger( data, offset, Float.floatToIntBits( value ) ); } }
EndianUtils { public static void writeSwappedFloat(final byte[] data, final int offset, final float value) { writeSwappedInteger( data, offset, Float.floatToIntBits( value ) ); } EndianUtils(); }
EndianUtils { public static void writeSwappedFloat(final byte[] data, final int offset, final float value) { writeSwappedInteger( data, offset, Float.floatToIntBits( value ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); st...
EndianUtils { public static void writeSwappedFloat(final byte[] data, final int offset, final float value) { writeSwappedInteger( data, offset, Float.floatToIntBits( value ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); st...
@Test public void is() { String h = "<p>Hello<p title=foo>there<p>world"; Document doc = Jsoup.parse(h); Elements ps = doc.select("p"); assertTrue(ps.is("[title=foo]")); assertFalse(ps.is("[title=bar]")); }
public boolean is(String query) { Evaluator eval = QueryParser.parse(query); for (Element e : this) { if (e.is(eval)) return true; } return false; }
Elements extends ArrayList<Element> { public boolean is(String query) { Evaluator eval = QueryParser.parse(query); for (Element e : this) { if (e.is(eval)) return true; } return false; } }
Elements extends ArrayList<Element> { public boolean is(String query) { Evaluator eval = QueryParser.parse(query); for (Element e : this) { if (e.is(eval)) return true; } return false; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); Elements(Ele...
Elements extends ArrayList<Element> { public boolean is(String query) { Evaluator eval = QueryParser.parse(query); for (Element e : this) { if (e.is(eval)) return true; } return false; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); Elements(Ele...
Elements extends ArrayList<Element> { public boolean is(String query) { Evaluator eval = QueryParser.parse(query); for (Element e : this) { if (e.is(eval)) return true; } return false; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); Elements(Ele...
@Test public void testReadSwappedDouble() throws IOException { final byte[] bytes = new byte[] { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01 }; final double d1 = Double.longBitsToDouble( 0x0102030405060708L ); final double d2 = EndianUtils.readSwappedDouble( bytes, 0 ); assertEquals( d1, d2, 0.0 ); final ByteArrayIn...
public static double readSwappedDouble(final byte[] data, final int offset) { return Double.longBitsToDouble( readSwappedLong( data, offset ) ); }
EndianUtils { public static double readSwappedDouble(final byte[] data, final int offset) { return Double.longBitsToDouble( readSwappedLong( data, offset ) ); } }
EndianUtils { public static double readSwappedDouble(final byte[] data, final int offset) { return Double.longBitsToDouble( readSwappedLong( data, offset ) ); } EndianUtils(); }
EndianUtils { public static double readSwappedDouble(final byte[] data, final int offset) { return Double.longBitsToDouble( readSwappedLong( data, offset ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFlo...
EndianUtils { public static double readSwappedDouble(final byte[] data, final int offset) { return Double.longBitsToDouble( readSwappedLong( data, offset ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); static float swapFlo...
@Test public void testWriteSwappedDouble() throws IOException { byte[] bytes = new byte[8]; final double d1 = Double.longBitsToDouble( 0x0102030405060708L ); EndianUtils.writeSwappedDouble( bytes, 0, d1 ); assertEquals( 0x08, bytes[0] ); assertEquals( 0x07, bytes[1] ); assertEquals( 0x06, bytes[2] ); assertEquals( 0x05...
public static void writeSwappedDouble(final byte[] data, final int offset, final double value) { writeSwappedLong( data, offset, Double.doubleToLongBits( value ) ); }
EndianUtils { public static void writeSwappedDouble(final byte[] data, final int offset, final double value) { writeSwappedLong( data, offset, Double.doubleToLongBits( value ) ); } }
EndianUtils { public static void writeSwappedDouble(final byte[] data, final int offset, final double value) { writeSwappedLong( data, offset, Double.doubleToLongBits( value ) ); } EndianUtils(); }
EndianUtils { public static void writeSwappedDouble(final byte[] data, final int offset, final double value) { writeSwappedLong( data, offset, Double.doubleToLongBits( value ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); ...
EndianUtils { public static void writeSwappedDouble(final byte[] data, final int offset, final double value) { writeSwappedLong( data, offset, Double.doubleToLongBits( value ) ); } EndianUtils(); static short swapShort(final short value); static int swapInteger(final int value); static long swapLong(final long value); ...
@Test public void testUnsignedOverrun() throws Exception { final byte[] target = new byte[] { 0, 0, 0, (byte)0x80 }; final long expected = 0x80000000L; long actual = EndianUtils.readSwappedUnsignedInteger(target, 0); assertEquals("readSwappedUnsignedInteger(byte[], int) was incorrect", expected, actual); final ByteArra...
public static long readSwappedUnsignedInteger(final byte[] data, final int offset) { final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) ); final long high = data[ offset + 3 ] & 0xff; return (high << 24) + (0xffffffffL & low); }
EndianUtils { public static long readSwappedUnsignedInteger(final byte[] data, final int offset) { final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) ); final long high = data[ offset + 3 ] & 0xff; return (high << 24) + (0xfffffff...
EndianUtils { public static long readSwappedUnsignedInteger(final byte[] data, final int offset) { final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) ); final long high = data[ offset + 3 ] & 0xff; return (high << 24) + (0xfffffff...
EndianUtils { public static long readSwappedUnsignedInteger(final byte[] data, final int offset) { final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) ); final long high = data[ offset + 3 ] & 0xff; return (high << 24) + (0xfffffff...
EndianUtils { public static long readSwappedUnsignedInteger(final byte[] data, final int offset) { final long low = ( ( ( data[ offset + 0 ] & 0xff ) << 0 ) + ( ( data[ offset + 1 ] & 0xff ) << 8 ) + ( ( data[ offset + 2 ] & 0xff ) << 16 ) ); final long high = data[ offset + 3 ] & 0xff; return (high << 24) + (0xfffffff...
@Test public void noNames() throws Exception { final FullClassNameMatcher m = new FullClassNameMatcher(); assertFalse(m.matches(Integer.class.getName())); }
@Override public boolean matches(String className) { return classesSet.contains(className); }
FullClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return classesSet.contains(className); } }
FullClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return classesSet.contains(className); } FullClassNameMatcher(String... classes); }
FullClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return classesSet.contains(className); } FullClassNameMatcher(String... classes); @Override boolean matches(String className); }
FullClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return classesSet.contains(className); } FullClassNameMatcher(String... classes); @Override boolean matches(String className); }
@Test public void withNames() throws Exception { final FullClassNameMatcher m = new FullClassNameMatcher(NAMES_ARRAY); assertTrue(m.matches(Integer.class.getName())); assertFalse(m.matches(String.class.getName())); }
@Override public boolean matches(String className) { return classesSet.contains(className); }
FullClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return classesSet.contains(className); } }
FullClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return classesSet.contains(className); } FullClassNameMatcher(String... classes); }
FullClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return classesSet.contains(className); } FullClassNameMatcher(String... classes); @Override boolean matches(String className); }
FullClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return classesSet.contains(className); } FullClassNameMatcher(String... classes); @Override boolean matches(String className); }
@Test public void noPattern() { ClassNameMatcher ca = new WildcardClassNameMatcher("org.foo"); assertTrue(ca.matches("org.foo")); assertFalse(ca.matches("org.foo.and.more")); assertFalse(ca.matches("org_foo")); }
@Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } WildcardClassNameMatcher(String pattern); }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } WildcardClassNameMatcher(String pattern); @Override boolean matches(String className); }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } WildcardClassNameMatcher(String pattern); @Override boolean matches(String className); }
@Test public void star() { ClassNameMatcher ca = new WildcardClassNameMatcher("org*"); assertTrue(ca.matches("org.foo.should.match")); assertFalse(ca.matches("bar.should.not.match")); }
@Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } WildcardClassNameMatcher(String pattern); }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } WildcardClassNameMatcher(String pattern); @Override boolean matches(String className); }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } WildcardClassNameMatcher(String pattern); @Override boolean matches(String className); }
@Test public void starAndQuestionMark() { ClassNameMatcher ca = new WildcardClassNameMatcher("org?apache?something*"); assertTrue(ca.matches("org.apache_something.more")); assertFalse(ca.matches("org..apache_something.more")); }
@Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } WildcardClassNameMatcher(String pattern); }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } WildcardClassNameMatcher(String pattern); @Override boolean matches(String className); }
WildcardClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return FilenameUtils.wildcardMatch(className, pattern); } WildcardClassNameMatcher(String pattern); @Override boolean matches(String className); }
@Test public void testSimplePatternFromString() { ClassNameMatcher ca = new RegexpClassNameMatcher("foo.*"); assertTrue(ca.matches("foo.should.match")); assertFalse(ca.matches("bar.should.not.match")); }
@Override public boolean matches(String className) { return pattern.matcher(className).matches(); }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } RegexpClassNameMatcher(String regex); RegexpClassNameMatcher(Pattern pattern); }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } RegexpClassNameMatcher(String regex); RegexpClassNameMatcher(Pattern pattern); @Override boolean matches(String className); }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } RegexpClassNameMatcher(String regex); RegexpClassNameMatcher(Pattern pattern); @Override boolean matches(String className); }
@Test public void testSimplePatternFromPattern() { ClassNameMatcher ca = new RegexpClassNameMatcher(Pattern.compile("foo.*")); assertTrue(ca.matches("foo.should.match")); assertFalse(ca.matches("bar.should.not.match")); }
@Override public boolean matches(String className) { return pattern.matcher(className).matches(); }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } RegexpClassNameMatcher(String regex); RegexpClassNameMatcher(Pattern pattern); }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } RegexpClassNameMatcher(String regex); RegexpClassNameMatcher(Pattern pattern); @Override boolean matches(String className); }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } RegexpClassNameMatcher(String regex); RegexpClassNameMatcher(Pattern pattern); @Override boolean matches(String className); }
@Test public void parents() { Document doc = Jsoup.parse("<div><p>Hello</p></div><p>There</p>"); Elements parents = doc.select("p").parents(); assertEquals(3, parents.size()); assertEquals("div", parents.get(0).tagName()); assertEquals("body", parents.get(1).tagName()); assertEquals("html", parents.get(2).tagName()); }
public Elements parents() { HashSet<Element> combo = new LinkedHashSet<>(); for (Element e: this) { combo.addAll(e.parents()); } return new Elements(combo); }
Elements extends ArrayList<Element> { public Elements parents() { HashSet<Element> combo = new LinkedHashSet<>(); for (Element e: this) { combo.addAll(e.parents()); } return new Elements(combo); } }
Elements extends ArrayList<Element> { public Elements parents() { HashSet<Element> combo = new LinkedHashSet<>(); for (Element e: this) { combo.addAll(e.parents()); } return new Elements(combo); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); El...
Elements extends ArrayList<Element> { public Elements parents() { HashSet<Element> combo = new LinkedHashSet<>(); for (Element e: this) { combo.addAll(e.parents()); } return new Elements(combo); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); El...
Elements extends ArrayList<Element> { public Elements parents() { HashSet<Element> combo = new LinkedHashSet<>(); for (Element e: this) { combo.addAll(e.parents()); } return new Elements(combo); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); El...
@Test public void testOrPattern() { ClassNameMatcher ca = new RegexpClassNameMatcher("foo.*|bar.*"); assertTrue(ca.matches("foo.should.match")); assertTrue(ca.matches("bar.should.match")); assertFalse(ca.matches("zoo.should.not.match")); }
@Override public boolean matches(String className) { return pattern.matcher(className).matches(); }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } RegexpClassNameMatcher(String regex); RegexpClassNameMatcher(Pattern pattern); }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } RegexpClassNameMatcher(String regex); RegexpClassNameMatcher(Pattern pattern); @Override boolean matches(String className); }
RegexpClassNameMatcher implements ClassNameMatcher { @Override public boolean matches(String className) { return pattern.matcher(className).matches(); } RegexpClassNameMatcher(String regex); RegexpClassNameMatcher(Pattern pattern); @Override boolean matches(String className); }
@Test public void acceptCustomMatcher() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .accept(ALWAYS_TRUE) ); }
public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test public void acceptPattern() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .accept(Pattern.compile(".*MockSerializedClass.*")) ); }
public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test public void acceptWildcard() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .accept("org.apache.commons.io.*") ); }
public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test(expected = InvalidClassException.class) public void ourTestClassNotAccepted() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .accept(Integer.class) ); }
public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test public void ourTestClassOnlyAccepted() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .accept(MockSerializedClass.class) ); }
public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test public void ourTestClassAcceptedFirst() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .accept(MockSerializedClass.class, Integer.class) ); }
public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test public void ourTestClassAcceptedSecond() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .accept(Integer.class, MockSerializedClass.class) ); }
public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test public void ourTestClassAcceptedFirstWildcard() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .accept("*MockSerializedClass","*Integer") ); }
public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test public void ourTestClassAcceptedSecondWildcard() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .accept("*Integer","*MockSerializedClass") ); }
public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream accept(Class<?>... classes) { for (Class<?> c : classes) { acceptMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test public void not() { Document doc = Jsoup.parse("<div id=1><p>One</p></div> <div id=2><p><span>Two</span></p></div>"); Elements div1 = doc.select("div").not(":has(p > span)"); assertEquals(1, div1.size()); assertEquals("1", div1.first().id()); Elements div2 = doc.select("div").not("#1"); assertEquals(1, div2.size(...
public Elements not(String query) { Elements out = Selector.select(query, this); return Selector.filterOut(this, out); }
Elements extends ArrayList<Element> { public Elements not(String query) { Elements out = Selector.select(query, this); return Selector.filterOut(this, out); } }
Elements extends ArrayList<Element> { public Elements not(String query) { Elements out = Selector.select(query, this); return Selector.filterOut(this, out); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); Elements(Element... elements); }
Elements extends ArrayList<Element> { public Elements not(String query) { Elements out = Selector.select(query, this); return Selector.filterOut(this, out); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); Elements(Element... elements); @Override...
Elements extends ArrayList<Element> { public Elements not(String query) { Elements out = Selector.select(query, this); return Selector.filterOut(this, out); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elements); Elements(Element... elements); @Override...
@Test(expected = InvalidClassException.class) public void reject() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .accept(Long.class) .reject(MockSerializedClass.class, Integer.class) ); }
public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test(expected = InvalidClassException.class) public void rejectOnly() throws Exception { assertSerialization( willClose(new ValidatingObjectInputStream(testStream)) .reject(Integer.class) ); }
public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test(expected = RuntimeException.class) public void customInvalidMethod() throws Exception { class CustomVOIS extends ValidatingObjectInputStream { CustomVOIS(InputStream is) throws IOException { super(is); } @Override protected void invalidClassNameFound(String className) throws InvalidClassException { throw new Runt...
public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); }
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
ValidatingObjectInputStream extends ObjectInputStream { public ValidatingObjectInputStream reject(Class<?>... classes) { for (Class<?> c : classes) { rejectMatchers.add(new FullClassNameMatcher(c.getName())); } return this; } ValidatingObjectInputStream(InputStream input); ValidatingObjectInputStream accept(Class<?>......
@Test public void testCaseSensitivity() { final File file3 = new File("FOO/file.txt"); final Comparator<File> sensitive = new PathFileComparator(null); assertTrue("sensitive file1 & file2 = 0", sensitive.compare(equalFile1, equalFile2) == 0); assertTrue("sensitive file1 & file3 > 0", sensitive.compare(equalFile1, file3...
public int compare(final File file1, final File file2) { return caseSensitivity.checkCompareTo(file1.getPath(), file2.getPath()); }
PathFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { return caseSensitivity.checkCompareTo(file1.getPath(), file2.getPath()); } }
PathFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { return caseSensitivity.checkCompareTo(file1.getPath(), file2.getPath()); } PathFileComparator(); PathFileComparator(final IOCase caseSensitivity); }
PathFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { return caseSensitivity.checkCompareTo(file1.getPath(), file2.getPath()); } PathFileComparator(); PathFileComparator(final IOCase caseSensitivity); int compare(final File file1, final Fil...
PathFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { return caseSensitivity.checkCompareTo(file1.getPath(), file2.getPath()); } PathFileComparator(); PathFileComparator(final IOCase caseSensitivity); int compare(final File file1, final Fil...
@Test public void testCaseSensitivity() { final File file3 = new File("a/FOO.txt"); final Comparator<File> sensitive = new NameFileComparator(null); assertTrue("sensitive file1 & file2 = 0", sensitive.compare(equalFile1, equalFile2) == 0); assertTrue("sensitive file1 & file3 > 0", sensitive.compare(equalFile1, file3) >...
public int compare(final File file1, final File file2) { return caseSensitivity.checkCompareTo(file1.getName(), file2.getName()); }
NameFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { return caseSensitivity.checkCompareTo(file1.getName(), file2.getName()); } }
NameFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { return caseSensitivity.checkCompareTo(file1.getName(), file2.getName()); } NameFileComparator(); NameFileComparator(final IOCase caseSensitivity); }
NameFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { return caseSensitivity.checkCompareTo(file1.getName(), file2.getName()); } NameFileComparator(); NameFileComparator(final IOCase caseSensitivity); int compare(final File file1, final Fil...
NameFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { return caseSensitivity.checkCompareTo(file1.getName(), file2.getName()); } NameFileComparator(); NameFileComparator(final IOCase caseSensitivity); int compare(final File file1, final Fil...
@Test public void testNonexistantFile() { final File nonexistantFile = new File(new File("."), "nonexistant.txt"); assertFalse(nonexistantFile.exists()); assertTrue("less", comparator.compare(nonexistantFile, moreFile) < 0); }
public int compare(final File file1, final File file2) { long size1 = 0; if (file1.isDirectory()) { size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0; } else { size1 = file1.length(); } long size2 = 0; if (file2.isDirectory()) { size2 = sumDirectoryContents && file2.exists() ? FileUt...
SizeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { long size1 = 0; if (file1.isDirectory()) { size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0; } else { size1 = file1.length(); } long size2 = 0; if (fi...
SizeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { long size1 = 0; if (file1.isDirectory()) { size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0; } else { size1 = file1.length(); } long size2 = 0; if (fi...
SizeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { long size1 = 0; if (file1.isDirectory()) { size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0; } else { size1 = file1.length(); } long size2 = 0; if (fi...
SizeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { long size1 = 0; if (file1.isDirectory()) { size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0; } else { size1 = file1.length(); } long size2 = 0; if (fi...
@Test public void testCompareDirectorySizes() { assertEquals("sumDirectoryContents=false", 0, comparator.compare(smallerDir, largerDir)); assertEquals("less", -1, SizeFileComparator.SIZE_SUMDIR_COMPARATOR.compare(smallerDir, largerDir)); assertEquals("less", 1, SizeFileComparator.SIZE_SUMDIR_REVERSE.compare(smallerDir,...
public int compare(final File file1, final File file2) { long size1 = 0; if (file1.isDirectory()) { size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0; } else { size1 = file1.length(); } long size2 = 0; if (file2.isDirectory()) { size2 = sumDirectoryContents && file2.exists() ? FileUt...
SizeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { long size1 = 0; if (file1.isDirectory()) { size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0; } else { size1 = file1.length(); } long size2 = 0; if (fi...
SizeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { long size1 = 0; if (file1.isDirectory()) { size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0; } else { size1 = file1.length(); } long size2 = 0; if (fi...
SizeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { long size1 = 0; if (file1.isDirectory()) { size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0; } else { size1 = file1.length(); } long size2 = 0; if (fi...
SizeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { long size1 = 0; if (file1.isDirectory()) { size1 = sumDirectoryContents && file1.exists() ? FileUtils.sizeOfDirectory(file1) : 0; } else { size1 = file1.length(); } long size2 = 0; if (fi...
@Test public void testCaseSensitivity() { final File file3 = new File("abc.FOO"); final Comparator<File> sensitive = new ExtensionFileComparator(null); assertTrue("sensitive file1 & file2 = 0", sensitive.compare(equalFile1, equalFile2) == 0); assertTrue("sensitive file1 & file3 > 0", sensitive.compare(equalFile1, file3...
public int compare(final File file1, final File file2) { final String suffix1 = FilenameUtils.getExtension(file1.getName()); final String suffix2 = FilenameUtils.getExtension(file2.getName()); return caseSensitivity.checkCompareTo(suffix1, suffix2); }
ExtensionFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { final String suffix1 = FilenameUtils.getExtension(file1.getName()); final String suffix2 = FilenameUtils.getExtension(file2.getName()); return caseSensitivity.checkCompareTo(suffix1,...
ExtensionFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { final String suffix1 = FilenameUtils.getExtension(file1.getName()); final String suffix2 = FilenameUtils.getExtension(file2.getName()); return caseSensitivity.checkCompareTo(suffix1,...
ExtensionFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { final String suffix1 = FilenameUtils.getExtension(file1.getName()); final String suffix2 = FilenameUtils.getExtension(file2.getName()); return caseSensitivity.checkCompareTo(suffix1,...
ExtensionFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { final String suffix1 = FilenameUtils.getExtension(file1.getName()); final String suffix2 = FilenameUtils.getExtension(file2.getName()); return caseSensitivity.checkCompareTo(suffix1,...
@Test public void constructorIterable_order() { final List<Comparator<File>> list = new ArrayList<Comparator<File>>(); list.add(SizeFileComparator.SIZE_COMPARATOR); list.add(ExtensionFileComparator.EXTENSION_COMPARATOR); final Comparator<File> c = new CompositeFileComparator(list); assertEquals("equal", 0, c.compare(eq...
public int compare(final File file1, final File file2) { int result = 0; for (final Comparator<File> delegate : delegates) { result = delegate.compare(file1, file2); if (result != 0) { break; } } return result; }
CompositeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { int result = 0; for (final Comparator<File> delegate : delegates) { result = delegate.compare(file1, file2); if (result != 0) { break; } } return result; } }
CompositeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { int result = 0; for (final Comparator<File> delegate : delegates) { result = delegate.compare(file1, file2); if (result != 0) { break; } } return result; } @SuppressWarnings("uncheck...
CompositeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { int result = 0; for (final Comparator<File> delegate : delegates) { result = delegate.compare(file1, file2); if (result != 0) { break; } } return result; } @SuppressWarnings("uncheck...
CompositeFileComparator extends AbstractFileComparator implements Serializable { public int compare(final File file1, final File file2) { int result = 0; for (final Comparator<File> delegate : delegates) { result = delegate.compare(file1, file2); if (result != 0) { break; } } return result; } @SuppressWarnings("uncheck...
@Test public void testRead() throws Exception { final ClosedInputStream cis = new ClosedInputStream(); assertEquals("read()", -1, cis.read()); cis.close(); }
@Override public int read() { return EOF; }
ClosedInputStream extends InputStream { @Override public int read() { return EOF; } }
ClosedInputStream extends InputStream { @Override public int read() { return EOF; } }
ClosedInputStream extends InputStream { @Override public int read() { return EOF; } @Override int read(); }
ClosedInputStream extends InputStream { @Override public int read() { return EOF; } @Override int read(); static final ClosedInputStream CLOSED_INPUT_STREAM; }
@Test public void traverse() { Document doc = Jsoup.parse("<div><p>Hello</p></div><div>There</div>"); final StringBuilder accum = new StringBuilder(); doc.select("div").traverse(new NodeVisitor() { public void head(Node node, int depth) { accum.append("<" + node.nodeName() + ">"); } public void tail(Node node, int dept...
public Elements traverse(NodeVisitor nodeVisitor) { Validate.notNull(nodeVisitor); NodeTraversor traversor = new NodeTraversor(nodeVisitor); for (Element el: this) { traversor.traverse(el); } return this; }
Elements extends ArrayList<Element> { public Elements traverse(NodeVisitor nodeVisitor) { Validate.notNull(nodeVisitor); NodeTraversor traversor = new NodeTraversor(nodeVisitor); for (Element el: this) { traversor.traverse(el); } return this; } }
Elements extends ArrayList<Element> { public Elements traverse(NodeVisitor nodeVisitor) { Validate.notNull(nodeVisitor); NodeTraversor traversor = new NodeTraversor(nodeVisitor); for (Element el: this) { traversor.traverse(el); } return this; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> e...
Elements extends ArrayList<Element> { public Elements traverse(NodeVisitor nodeVisitor) { Validate.notNull(nodeVisitor); NodeTraversor traversor = new NodeTraversor(nodeVisitor); for (Element el: this) { traversor.traverse(el); } return this; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> e...
Elements extends ArrayList<Element> { public Elements traverse(NodeVisitor nodeVisitor) { Validate.notNull(nodeVisitor); NodeTraversor traversor = new NodeTraversor(nodeVisitor); for (Element el: this) { traversor.traverse(el); } return this; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> e...
@Test public void testRead() throws Exception { final int size = 5; final TestNullReader reader = new TestNullReader(size); for (int i = 0; i < size; i++) { assertEquals("Check Value [" + i + "]", i, reader.read()); } assertEquals("End of File", -1, reader.read()); try { final int result = reader.read(); fail("Should h...
@Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); }
NullReader extends Reader { @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); } }
NullReader extends Reader { @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); } NullReader(final long size); NullReader(final long size, final boolean markSupported, final bool...
NullReader extends Reader { @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); } NullReader(final long size); NullReader(final long size, final boolean markSupported, final bool...
NullReader extends Reader { @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); } NullReader(final long size); NullReader(final long size, final boolean markSupported, final bool...
@Test public void testSkip() throws Exception { final Reader reader = new TestNullReader(10, true, false); assertEquals("Read 1", 0, reader.read()); assertEquals("Read 2", 1, reader.read()); assertEquals("Skip 1", 5, reader.skip(5)); assertEquals("Read 3", 7, reader.read()); assertEquals("Skip 2", 2, reader.skip(5)); a...
@Override public long skip(final long numberOfChars) throws IOException { if (eof) { throw new IOException("Skip after end of file"); } if (position == size) { return doEndOfFile(); } position += numberOfChars; long returnLength = numberOfChars; if (position > size) { returnLength = numberOfChars - (position - size); p...
NullReader extends Reader { @Override public long skip(final long numberOfChars) throws IOException { if (eof) { throw new IOException("Skip after end of file"); } if (position == size) { return doEndOfFile(); } position += numberOfChars; long returnLength = numberOfChars; if (position > size) { returnLength = numberOf...
NullReader extends Reader { @Override public long skip(final long numberOfChars) throws IOException { if (eof) { throw new IOException("Skip after end of file"); } if (position == size) { return doEndOfFile(); } position += numberOfChars; long returnLength = numberOfChars; if (position > size) { returnLength = numberOf...
NullReader extends Reader { @Override public long skip(final long numberOfChars) throws IOException { if (eof) { throw new IOException("Skip after end of file"); } if (position == size) { return doEndOfFile(); } position += numberOfChars; long returnLength = numberOfChars; if (position > size) { returnLength = numberOf...
NullReader extends Reader { @Override public long skip(final long numberOfChars) throws IOException { if (eof) { throw new IOException("Skip after end of file"); } if (position == size) { return doEndOfFile(); } position += numberOfChars; long returnLength = numberOfChars; if (position > size) { returnLength = numberOf...
@Test public void testClose() throws IOException { shielded.close(); assertFalse("closed", closed); assertEquals("read()", -1, shielded.read()); assertEquals("read()", data[0], original.read()); }
@Override public void close() { in = new ClosedInputStream(); }
CloseShieldInputStream extends ProxyInputStream { @Override public void close() { in = new ClosedInputStream(); } }
CloseShieldInputStream extends ProxyInputStream { @Override public void close() { in = new ClosedInputStream(); } CloseShieldInputStream(final InputStream in); }
CloseShieldInputStream extends ProxyInputStream { @Override public void close() { in = new ClosedInputStream(); } CloseShieldInputStream(final InputStream in); @Override void close(); }
CloseShieldInputStream extends ProxyInputStream { @Override public void close() { in = new ClosedInputStream(); } CloseShieldInputStream(final InputStream in); @Override void close(); }
@Test public void testReadOneByte() throws Exception { assertEquals('a', tee.read()); assertEquals("a", new String(output.toString(ASCII))); }
@Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
@Test public void testReadEverything() throws Exception { assertEquals('a', tee.read()); assertEquals('b', tee.read()); assertEquals('c', tee.read()); assertEquals(-1, tee.read()); assertEquals("abc", new String(output.toString(ASCII))); }
@Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
@Test public void testReadToArray() throws Exception { final byte[] buffer = new byte[8]; assertEquals(3, tee.read(buffer)); assertEquals('a', buffer[0]); assertEquals('b', buffer[1]); assertEquals('c', buffer[2]); assertEquals(-1, tee.read(buffer)); assertEquals("abc", new String(output.toString(ASCII))); }
@Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
@Test public void testReadToArrayWithOffset() throws Exception { final byte[] buffer = new byte[8]; assertEquals(3, tee.read(buffer, 4, 4)); assertEquals('a', buffer[4]); assertEquals('b', buffer[5]); assertEquals('c', buffer[6]); assertEquals(-1, tee.read(buffer, 4, 4)); assertEquals("abc", new String(output.toString(...
@Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
@Test public void testSkip() throws Exception { assertEquals('a', tee.read()); assertEquals(1, tee.skip(1)); assertEquals('c', tee.read()); assertEquals(-1, tee.read()); assertEquals("ac", new String(output.toString(ASCII))); }
@Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
@Test public void testMarkReset() throws Exception { assertEquals('a', tee.read()); tee.mark(1); assertEquals('b', tee.read()); tee.reset(); assertEquals('b', tee.read()); assertEquals('c', tee.read()); assertEquals(-1, tee.read()); assertEquals("abbc", new String(output.toString(ASCII))); }
@Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } }
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
TeeInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int ch = super.read(); if (ch != EOF) { branch.write(ch); } return ch; } TeeInputStream(final InputStream input, final OutputStream branch); TeeInputStream( final InputStream input, final OutputStream branch, f...
@Test public void testMarkSupported() throws Exception { final InputStream r = new CharSequenceInputStream("test", "UTF-8"); try { assertTrue(r.markSupported()); } finally { r.close(); } }
@Override public boolean markSupported() { return true; }
CharSequenceInputStream extends InputStream { @Override public boolean markSupported() { return true; } }
CharSequenceInputStream extends InputStream { @Override public boolean markSupported() { return true; } CharSequenceInputStream(final CharSequence cs, final Charset charset, final int bufferSize); CharSequenceInputStream(final CharSequence cs, final String charset, final int bufferSize); CharSequenceInputStream(final...
CharSequenceInputStream extends InputStream { @Override public boolean markSupported() { return true; } CharSequenceInputStream(final CharSequence cs, final Charset charset, final int bufferSize); CharSequenceInputStream(final CharSequence cs, final String charset, final int bufferSize); CharSequenceInputStream(final...
CharSequenceInputStream extends InputStream { @Override public boolean markSupported() { return true; } CharSequenceInputStream(final CharSequence cs, final Charset charset, final int bufferSize); CharSequenceInputStream(final CharSequence cs, final String charset, final int bufferSize); CharSequenceInputStream(final...
@Test public void forms() { Document doc = Jsoup.parse("<form id=1><input name=q></form><div /><form id=2><input name=f></form>"); Elements els = doc.select("*"); assertEquals(9, els.size()); List<FormElement> forms = els.forms(); assertEquals(2, forms.size()); assertTrue(forms.get(0) != null); assertTrue(forms.get(1) ...
public List<FormElement> forms() { ArrayList<FormElement> forms = new ArrayList<>(); for (Element el: this) if (el instanceof FormElement) forms.add((FormElement) el); return forms; }
Elements extends ArrayList<Element> { public List<FormElement> forms() { ArrayList<FormElement> forms = new ArrayList<>(); for (Element el: this) if (el instanceof FormElement) forms.add((FormElement) el); return forms; } }
Elements extends ArrayList<Element> { public List<FormElement> forms() { ArrayList<FormElement> forms = new ArrayList<>(); for (Element el: this) if (el instanceof FormElement) forms.add((FormElement) el); return forms; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(Lis...
Elements extends ArrayList<Element> { public List<FormElement> forms() { ArrayList<FormElement> forms = new ArrayList<>(); for (Element el: this) if (el instanceof FormElement) forms.add((FormElement) el); return forms; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(Lis...
Elements extends ArrayList<Element> { public List<FormElement> forms() { ArrayList<FormElement> forms = new ArrayList<>(); for (Element el: this) if (el instanceof FormElement) forms.add((FormElement) el); return forms; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(Lis...
@Test public void testAvailable() throws Exception { for (final String csName : Charset.availableCharsets().keySet()) { try { if (isAvailabilityTestableForCharset(csName)) { testAvailableSkip(csName); testAvailableRead(csName); } } catch (UnsupportedOperationException e){ fail("Operation not supported for " + csName); ...
@Override public int available() throws IOException { return this.bbuf.remaining() + this.cbuf.remaining(); }
CharSequenceInputStream extends InputStream { @Override public int available() throws IOException { return this.bbuf.remaining() + this.cbuf.remaining(); } }
CharSequenceInputStream extends InputStream { @Override public int available() throws IOException { return this.bbuf.remaining() + this.cbuf.remaining(); } CharSequenceInputStream(final CharSequence cs, final Charset charset, final int bufferSize); CharSequenceInputStream(final CharSequence cs, final String charset, f...
CharSequenceInputStream extends InputStream { @Override public int available() throws IOException { return this.bbuf.remaining() + this.cbuf.remaining(); } CharSequenceInputStream(final CharSequence cs, final Charset charset, final int bufferSize); CharSequenceInputStream(final CharSequence cs, final String charset, f...
CharSequenceInputStream extends InputStream { @Override public int available() throws IOException { return this.bbuf.remaining() + this.cbuf.remaining(); } CharSequenceInputStream(final CharSequence cs, final Charset charset, final int bufferSize); CharSequenceInputStream(final CharSequence cs, final String charset, f...
@Test public void testEmptyBufferWithBOM() throws Exception { final byte[] data = new byte[] {}; final InputStream in = new BOMInputStream(createUtf8DataStream(data, true)); final byte[] buf = new byte[1024]; assertEquals(-1, in.read(buf)); in.close(); }
@Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
@Test public void testEmptyBufferWithoutBOM() throws Exception { final byte[] data = new byte[] {}; final InputStream in = new BOMInputStream(createUtf8DataStream(data, false)); final byte[] buf = new byte[1024]; assertEquals(-1, in.read(buf)); in.close(); }
@Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
@Test public void testLargeBufferWithBOM() throws Exception { final byte[] data = new byte[] { 'A', 'B', 'C' }; final InputStream in = new BOMInputStream(createUtf8DataStream(data, true)); final byte[] buf = new byte[1024]; assertData(data, buf, in.read(buf)); in.close(); }
@Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
@Test public void testLargeBufferWithoutBOM() throws Exception { final byte[] data = new byte[] { 'A', 'B', 'C' }; final InputStream in = new BOMInputStream(createUtf8DataStream(data, false)); final byte[] buf = new byte[1024]; assertData(data, buf, in.read(buf)); in.close(); }
@Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
@Test public void testLeadingNonBOMBufferedRead() throws Exception { final byte[] data = new byte[] { (byte) 0xEF, (byte) 0xAB, (byte) 0xCD }; final InputStream in = new BOMInputStream(createUtf8DataStream(data, false)); final byte[] buf = new byte[1024]; assertData(data, buf, in.read(buf)); in.close(); }
@Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
@Test public void testLeadingNonBOMSingleRead() throws Exception { final byte[] data = new byte[] { (byte) 0xEF, (byte) 0xAB, (byte) 0xCD }; final InputStream in = new BOMInputStream(createUtf8DataStream(data, false)); assertEquals(0xEF, in.read()); assertEquals(0xAB, in.read()); assertEquals(0xCD, in.read()); assertEq...
@Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
@Test public void testSmallBufferWithBOM() throws Exception { final byte[] data = new byte[] { 'A', 'B', 'C' }; final InputStream in = new BOMInputStream(createUtf8DataStream(data, true)); final byte[] buf = new byte[1024]; assertData(new byte[] { 'A', 'B' }, buf, in.read(buf, 0, 2)); assertData(new byte[] { 'C' }, buf...
@Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
@Test public void testSmallBufferWithoutBOM() throws Exception { final byte[] data = new byte[] { 'A', 'B', 'C' }; final InputStream in = new BOMInputStream(createUtf8DataStream(data, false)); final byte[] buf = new byte[1024]; assertData(new byte[] { 'A', 'B' }, buf, in.read(buf, 0, 2)); assertData(new byte[] { 'C' },...
@Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
@Test public void testSupportCode() throws Exception { final InputStream in = createUtf8DataStream(new byte[] { 'A', 'B' }, true); final byte[] buf = new byte[1024]; final int len = in.read(buf); assertEquals(5, len); assertEquals(0xEF, buf[0] & 0xFF); assertEquals(0xBB, buf[1] & 0xFF); assertEquals(0xBF, buf[2] & 0xFF...
@Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } }
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
BOMInputStream extends ProxyInputStream { @Override public int read() throws IOException { final int b = readFirstBytes(); return b >= 0 ? b : in.read(); } BOMInputStream(final InputStream delegate); BOMInputStream(final InputStream delegate, final boolean include); BOMInputStream(final InputStream delegate, final By...
@Test public void classWithHyphen() { Document doc = Jsoup.parse("<p class='tab-nav'>Check</p>"); Elements els = doc.getElementsByClass("tab-nav"); assertEquals(1, els.size()); assertEquals("Check", els.text()); }
public String text() { StringBuilder sb = new StringBuilder(); for (Element element : this) { if (sb.length() != 0) sb.append(" "); sb.append(element.text()); } return sb.toString(); }
Elements extends ArrayList<Element> { public String text() { StringBuilder sb = new StringBuilder(); for (Element element : this) { if (sb.length() != 0) sb.append(" "); sb.append(element.text()); } return sb.toString(); } }
Elements extends ArrayList<Element> { public String text() { StringBuilder sb = new StringBuilder(); for (Element element : this) { if (sb.length() != 0) sb.append(" "); sb.append(element.text()); } return sb.toString(); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(Li...
Elements extends ArrayList<Element> { public String text() { StringBuilder sb = new StringBuilder(); for (Element element : this) { if (sb.length() != 0) sb.append(" "); sb.append(element.text()); } return sb.toString(); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(Li...
Elements extends ArrayList<Element> { public String text() { StringBuilder sb = new StringBuilder(); for (Element element : this) { if (sb.length() != 0) sb.append(" "); sb.append(element.text()); } return sb.toString(); } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(Li...
@Test public void testRead() throws Exception { final int size = 5; final InputStream input = new TestNullInputStream(size); for (int i = 0; i < size; i++) { assertEquals("Check Size [" + i + "]", size - i, input.available()); assertEquals("Check Value [" + i + "]", i, input.read()); } assertEquals("Available after con...
@Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processByte(); }
NullInputStream extends InputStream { @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processByte(); } }
NullInputStream extends InputStream { @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processByte(); } NullInputStream(final long size); NullInputStream(final long size, final boolean markS...
NullInputStream extends InputStream { @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processByte(); } NullInputStream(final long size); NullInputStream(final long size, final boolean markS...
NullInputStream extends InputStream { @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processByte(); } NullInputStream(final long size); NullInputStream(final long size, final boolean markS...
@Test public void testSkip() throws Exception { final InputStream input = new TestNullInputStream(10, true, false); assertEquals("Read 1", 0, input.read()); assertEquals("Read 2", 1, input.read()); assertEquals("Skip 1", 5, input.skip(5)); assertEquals("Read 3", 7, input.read()); assertEquals("Skip 2", 2, input.skip(5)...
@Override public long skip(final long numberOfBytes) throws IOException { if (eof) { throw new IOException("Skip after end of file"); } if (position == size) { return doEndOfFile(); } position += numberOfBytes; long returnLength = numberOfBytes; if (position > size) { returnLength = numberOfBytes - (position - size); p...
NullInputStream extends InputStream { @Override public long skip(final long numberOfBytes) throws IOException { if (eof) { throw new IOException("Skip after end of file"); } if (position == size) { return doEndOfFile(); } position += numberOfBytes; long returnLength = numberOfBytes; if (position > size) { returnLength ...
NullInputStream extends InputStream { @Override public long skip(final long numberOfBytes) throws IOException { if (eof) { throw new IOException("Skip after end of file"); } if (position == size) { return doEndOfFile(); } position += numberOfBytes; long returnLength = numberOfBytes; if (position > size) { returnLength ...
NullInputStream extends InputStream { @Override public long skip(final long numberOfBytes) throws IOException { if (eof) { throw new IOException("Skip after end of file"); } if (position == size) { return doEndOfFile(); } position += numberOfBytes; long returnLength = numberOfBytes; if (position > size) { returnLength ...
NullInputStream extends InputStream { @Override public long skip(final long numberOfBytes) throws IOException { if (eof) { throw new IOException("Skip after end of file"); } if (position == size) { return doEndOfFile(); } position += numberOfBytes; long returnLength = numberOfBytes; if (position > size) { returnLength ...
@Test public void testClose() throws IOException { final Reader reader = new CharSequenceReader("FooBar"); checkRead(reader, "Foo"); reader.close(); checkRead(reader, "Foo"); }
@Override public void close() { idx = 0; mark = 0; }
CharSequenceReader extends Reader implements Serializable { @Override public void close() { idx = 0; mark = 0; } }
CharSequenceReader extends Reader implements Serializable { @Override public void close() { idx = 0; mark = 0; } CharSequenceReader(final CharSequence charSequence); }
CharSequenceReader extends Reader implements Serializable { @Override public void close() { idx = 0; mark = 0; } CharSequenceReader(final CharSequence charSequence); @Override void close(); @Override void mark(final int readAheadLimit); @Override boolean markSupported(); @Override int read(); @Override int read(final c...
CharSequenceReader extends Reader implements Serializable { @Override public void close() { idx = 0; mark = 0; } CharSequenceReader(final CharSequence charSequence); @Override void close(); @Override void mark(final int readAheadLimit); @Override boolean markSupported(); @Override int read(); @Override int read(final c...
@Test public void testMarkSupported() throws Exception { final Reader reader = new CharSequenceReader("FooBar"); assertTrue(reader.markSupported()); reader.close(); }
@Override public boolean markSupported() { return true; }
CharSequenceReader extends Reader implements Serializable { @Override public boolean markSupported() { return true; } }
CharSequenceReader extends Reader implements Serializable { @Override public boolean markSupported() { return true; } CharSequenceReader(final CharSequence charSequence); }
CharSequenceReader extends Reader implements Serializable { @Override public boolean markSupported() { return true; } CharSequenceReader(final CharSequence charSequence); @Override void close(); @Override void mark(final int readAheadLimit); @Override boolean markSupported(); @Override int read(); @Override int read(fi...
CharSequenceReader extends Reader implements Serializable { @Override public boolean markSupported() { return true; } CharSequenceReader(final CharSequence charSequence); @Override void close(); @Override void mark(final int readAheadLimit); @Override boolean markSupported(); @Override int read(); @Override int read(fi...
@Test public void testMark() throws IOException { final Reader reader = new CharSequenceReader("FooBar"); checkRead(reader, "Foo"); reader.mark(0); checkRead(reader, "Bar"); reader.reset(); checkRead(reader, "Bar"); reader.close(); checkRead(reader, "Foo"); reader.reset(); checkRead(reader, "Foo"); }
@Override public void mark(final int readAheadLimit) { mark = idx; }
CharSequenceReader extends Reader implements Serializable { @Override public void mark(final int readAheadLimit) { mark = idx; } }
CharSequenceReader extends Reader implements Serializable { @Override public void mark(final int readAheadLimit) { mark = idx; } CharSequenceReader(final CharSequence charSequence); }
CharSequenceReader extends Reader implements Serializable { @Override public void mark(final int readAheadLimit) { mark = idx; } CharSequenceReader(final CharSequence charSequence); @Override void close(); @Override void mark(final int readAheadLimit); @Override boolean markSupported(); @Override int read(); @Override ...
CharSequenceReader extends Reader implements Serializable { @Override public void mark(final int readAheadLimit) { mark = idx; } CharSequenceReader(final CharSequence charSequence); @Override void close(); @Override void mark(final int readAheadLimit); @Override boolean markSupported(); @Override int read(); @Override ...
@Test public void testSkip() throws IOException { final Reader reader = new CharSequenceReader("FooBar"); assertEquals(3, reader.skip(3)); checkRead(reader, "Bar"); assertEquals(-1, reader.skip(3)); reader.reset(); assertEquals(2, reader.skip(2)); assertEquals(4, reader.skip(10)); assertEquals(-1, reader.skip(1)); read...
@Override public long skip(final long n) { if (n < 0) { throw new IllegalArgumentException( "Number of characters to skip is less than zero: " + n); } if (idx >= charSequence.length()) { return EOF; } final int dest = (int)Math.min(charSequence.length(), idx + n); final int count = dest - idx; idx = dest; return count;...
CharSequenceReader extends Reader implements Serializable { @Override public long skip(final long n) { if (n < 0) { throw new IllegalArgumentException( "Number of characters to skip is less than zero: " + n); } if (idx >= charSequence.length()) { return EOF; } final int dest = (int)Math.min(charSequence.length(), idx +...
CharSequenceReader extends Reader implements Serializable { @Override public long skip(final long n) { if (n < 0) { throw new IllegalArgumentException( "Number of characters to skip is less than zero: " + n); } if (idx >= charSequence.length()) { return EOF; } final int dest = (int)Math.min(charSequence.length(), idx +...
CharSequenceReader extends Reader implements Serializable { @Override public long skip(final long n) { if (n < 0) { throw new IllegalArgumentException( "Number of characters to skip is less than zero: " + n); } if (idx >= charSequence.length()) { return EOF; } final int dest = (int)Math.min(charSequence.length(), idx +...
CharSequenceReader extends Reader implements Serializable { @Override public long skip(final long n) { if (n < 0) { throw new IllegalArgumentException( "Number of characters to skip is less than zero: " + n); } if (idx >= charSequence.length()) { return EOF; } final int dest = (int)Math.min(charSequence.length(), idx +...
@Test public void testRead() throws IOException { final Reader reader = new CharSequenceReader("Foo"); assertEquals('F', reader.read()); assertEquals('o', reader.read()); assertEquals('o', reader.read()); assertEquals(-1, reader.read()); assertEquals(-1, reader.read()); reader.close(); }
@Override public int read() { if (idx >= charSequence.length()) { return EOF; } else { return charSequence.charAt(idx++); } }
CharSequenceReader extends Reader implements Serializable { @Override public int read() { if (idx >= charSequence.length()) { return EOF; } else { return charSequence.charAt(idx++); } } }
CharSequenceReader extends Reader implements Serializable { @Override public int read() { if (idx >= charSequence.length()) { return EOF; } else { return charSequence.charAt(idx++); } } CharSequenceReader(final CharSequence charSequence); }
CharSequenceReader extends Reader implements Serializable { @Override public int read() { if (idx >= charSequence.length()) { return EOF; } else { return charSequence.charAt(idx++); } } CharSequenceReader(final CharSequence charSequence); @Override void close(); @Override void mark(final int readAheadLimit); @Override ...
CharSequenceReader extends Reader implements Serializable { @Override public int read() { if (idx >= charSequence.length()) { return EOF; } else { return charSequence.charAt(idx++); } } CharSequenceReader(final CharSequence charSequence); @Override void close(); @Override void mark(final int readAheadLimit); @Override ...
@Test public void testReadBoolean() throws IOException { bytes = new byte[] { 0x00, 0x01, 0x02, }; final ByteArrayInputStream bais = new ByteArrayInputStream( bytes ); final SwappedDataInputStream sdis = new SwappedDataInputStream( bais ); assertEquals( false, sdis.readBoolean() ); assertEquals( true, sdis.readBoolean(...
public boolean readBoolean() throws IOException, EOFException { return 0 != readByte(); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public boolean readBoolean() throws IOException, EOFException { return 0 != readByte(); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public boolean readBoolean() throws IOException, EOFException { return 0 != readByte(); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public boolean readBoolean() throws IOException, EOFException { return 0 != readByte(); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat(); void readFu...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public boolean readBoolean() throws IOException, EOFException { return 0 != readByte(); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat(); void readFu...
@Test public void testReadByte() throws IOException { assertEquals( 0x01, this.sdis.readByte() ); }
public byte readByte() throws IOException, EOFException { return (byte)in.read(); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public byte readByte() throws IOException, EOFException { return (byte)in.read(); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public byte readByte() throws IOException, EOFException { return (byte)in.read(); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public byte readByte() throws IOException, EOFException { return (byte)in.read(); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat(); void readFully( f...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public byte readByte() throws IOException, EOFException { return (byte)in.read(); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat(); void readFully( f...
@Test public void testReadChar() throws IOException { assertEquals( (char) 0x0201, this.sdis.readChar() ); }
public char readChar() throws IOException, EOFException { return (char)readShort(); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public char readChar() throws IOException, EOFException { return (char)readShort(); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public char readChar() throws IOException, EOFException { return (char)readShort(); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public char readChar() throws IOException, EOFException { return (char)readShort(); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat(); void readFully(...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public char readChar() throws IOException, EOFException { return (char)readShort(); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat(); void readFully(...
@Test public void siblings() { Document doc = Jsoup.parse("<div><p>1<p>2<p>3<p>4<p>5<p>6</div><div><p>7<p>8<p>9<p>10<p>11<p>12</div>"); Elements els = doc.select("p:eq(3)"); assertEquals(2, els.size()); Elements next = els.next(); assertEquals(2, next.size()); assertEquals("5", next.first().text()); assertEquals("11", ...
private Elements siblings(String query, boolean next, boolean all) { Elements els = new Elements(); Evaluator eval = query != null? QueryParser.parse(query) : null; for (Element e : this) { do { Element sib = next ? e.nextElementSibling() : e.previousElementSibling(); if (sib == null) break; if (eval == null) els.add(s...
Elements extends ArrayList<Element> { private Elements siblings(String query, boolean next, boolean all) { Elements els = new Elements(); Evaluator eval = query != null? QueryParser.parse(query) : null; for (Element e : this) { do { Element sib = next ? e.nextElementSibling() : e.previousElementSibling(); if (sib == nu...
Elements extends ArrayList<Element> { private Elements siblings(String query, boolean next, boolean all) { Elements els = new Elements(); Evaluator eval = query != null? QueryParser.parse(query) : null; for (Element e : this) { do { Element sib = next ? e.nextElementSibling() : e.previousElementSibling(); if (sib == nu...
Elements extends ArrayList<Element> { private Elements siblings(String query, boolean next, boolean all) { Elements els = new Elements(); Evaluator eval = query != null? QueryParser.parse(query) : null; for (Element e : this) { do { Element sib = next ? e.nextElementSibling() : e.previousElementSibling(); if (sib == nu...
Elements extends ArrayList<Element> { private Elements siblings(String query, boolean next, boolean all) { Elements els = new Elements(); Evaluator eval = query != null? QueryParser.parse(query) : null; for (Element e : this) { do { Element sib = next ? e.nextElementSibling() : e.previousElementSibling(); if (sib == nu...
@Override @Test public void shouldGetResultFromResultSetByPosition() throws Exception { byte[] byteArray = new byte[]{1, 2}; when(rs.getBytes(1)).thenReturn(byteArray); when(rs.wasNull()).thenReturn(false); assertThat(TYPE_HANDLER.getResult(rs, 1), is(new Byte[]{1, 2})); }
private Byte[] getBytes(byte[] bytes) { Byte[] returnValue = null; if (bytes != null) { returnValue = ByteArrayUtils.convertToObjectArray(bytes); } return returnValue; }
ByteObjectArrayTypeHandler extends BaseTypeHandler<Byte[]> { private Byte[] getBytes(byte[] bytes) { Byte[] returnValue = null; if (bytes != null) { returnValue = ByteArrayUtils.convertToObjectArray(bytes); } return returnValue; } }
ByteObjectArrayTypeHandler extends BaseTypeHandler<Byte[]> { private Byte[] getBytes(byte[] bytes) { Byte[] returnValue = null; if (bytes != null) { returnValue = ByteArrayUtils.convertToObjectArray(bytes); } return returnValue; } }
ByteObjectArrayTypeHandler extends BaseTypeHandler<Byte[]> { private Byte[] getBytes(byte[] bytes) { Byte[] returnValue = null; if (bytes != null) { returnValue = ByteArrayUtils.convertToObjectArray(bytes); } return returnValue; } @Override void setNonNullParameter(PreparedStatement ps, int index, Byte[] parameter, Jd...
ByteObjectArrayTypeHandler extends BaseTypeHandler<Byte[]> { private Byte[] getBytes(byte[] bytes) { Byte[] returnValue = null; if (bytes != null) { returnValue = ByteArrayUtils.convertToObjectArray(bytes); } return returnValue; } @Override void setNonNullParameter(PreparedStatement ps, int index, Byte[] parameter, Jd...
@Test public void testReadDouble() throws IOException { assertEquals( Double.longBitsToDouble(0x0807060504030201L), this.sdis.readDouble(), 0 ); }
public double readDouble() throws IOException, EOFException { return EndianUtils.readSwappedDouble( in ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public double readDouble() throws IOException, EOFException { return EndianUtils.readSwappedDouble( in ); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public double readDouble() throws IOException, EOFException { return EndianUtils.readSwappedDouble( in ); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public double readDouble() throws IOException, EOFException { return EndianUtils.readSwappedDouble( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFl...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public double readDouble() throws IOException, EOFException { return EndianUtils.readSwappedDouble( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFl...
@Test public void testReadFloat() throws IOException { assertEquals( Float.intBitsToFloat(0x04030201), this.sdis.readFloat(), 0 ); }
public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public float readFloat() throws IOException, EOFException { return EndianUtils.readSwappedFloat( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat...
@Test public void testReadFully() throws IOException { final byte[] bytesIn = new byte[8]; this.sdis.readFully(bytesIn); for( int i=0; i<8; i++) { assertEquals( bytes[i], bytesIn[i] ); } }
public void readFully( final byte[] data ) throws IOException, EOFException { readFully( data, 0, data.length ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public void readFully( final byte[] data ) throws IOException, EOFException { readFully( data, 0, data.length ); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public void readFully( final byte[] data ) throws IOException, EOFException { readFully( data, 0, data.length ); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public void readFully( final byte[] data ) throws IOException, EOFException { readFully( data, 0, data.length ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public void readFully( final byte[] data ) throws IOException, EOFException { readFully( data, 0, data.length ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float...
@Test public void testReadInt() throws IOException { assertEquals( 0x04030201, this.sdis.readInt() ); }
public int readInt() throws IOException, EOFException { return EndianUtils.readSwappedInteger( in ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readInt() throws IOException, EOFException { return EndianUtils.readSwappedInteger( in ); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readInt() throws IOException, EOFException { return EndianUtils.readSwappedInteger( in ); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readInt() throws IOException, EOFException { return EndianUtils.readSwappedInteger( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat()...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readInt() throws IOException, EOFException { return EndianUtils.readSwappedInteger( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat()...
@Test(expected = UnsupportedOperationException.class) public void testReadLine() throws IOException { this.sdis.readLine(); fail("readLine should be unsupported. "); }
public String readLine() throws IOException, EOFException { throw new UnsupportedOperationException( "Operation not supported: readLine()" ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public String readLine() throws IOException, EOFException { throw new UnsupportedOperationException( "Operation not supported: readLine()" ); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public String readLine() throws IOException, EOFException { throw new UnsupportedOperationException( "Operation not supported: readLine()" ); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public String readLine() throws IOException, EOFException { throw new UnsupportedOperationException( "Operation not supported: readLine()" ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public String readLine() throws IOException, EOFException { throw new UnsupportedOperationException( "Operation not supported: readLine()" ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(...
@Test public void testReadLong() throws IOException { assertEquals( 0x0807060504030201L, this.sdis.readLong() ); }
public long readLong() throws IOException, EOFException { return EndianUtils.readSwappedLong( in ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public long readLong() throws IOException, EOFException { return EndianUtils.readSwappedLong( in ); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public long readLong() throws IOException, EOFException { return EndianUtils.readSwappedLong( in ); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public long readLong() throws IOException, EOFException { return EndianUtils.readSwappedLong( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat();...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public long readLong() throws IOException, EOFException { return EndianUtils.readSwappedLong( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat();...
@Test public void testReadShort() throws IOException { assertEquals( (short) 0x0201, this.sdis.readShort() ); }
public short readShort() throws IOException, EOFException { return EndianUtils.readSwappedShort( in ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public short readShort() throws IOException, EOFException { return EndianUtils.readSwappedShort( in ); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public short readShort() throws IOException, EOFException { return EndianUtils.readSwappedShort( in ); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public short readShort() throws IOException, EOFException { return EndianUtils.readSwappedShort( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public short readShort() throws IOException, EOFException { return EndianUtils.readSwappedShort( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat...
@Test public void testReadUnsignedByte() throws IOException { assertEquals( 0x01, this.sdis.readUnsignedByte() ); }
public int readUnsignedByte() throws IOException, EOFException { return in.read(); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readUnsignedByte() throws IOException, EOFException { return in.read(); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readUnsignedByte() throws IOException, EOFException { return in.read(); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readUnsignedByte() throws IOException, EOFException { return in.read(); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat(); void readFully( ...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readUnsignedByte() throws IOException, EOFException { return in.read(); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFloat(); void readFully( ...
@Test public void testReadUnsignedShort() throws IOException { assertEquals( (short) 0x0201, this.sdis.readUnsignedShort() ); }
public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); f...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); f...
@Test(expected = UnsupportedOperationException.class) public void testReadUTF() throws IOException { this.sdis.readUTF(); fail("readUTF should be unsupported. "); }
public String readUTF() throws IOException, EOFException { throw new UnsupportedOperationException( "Operation not supported: readUTF()" ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public String readUTF() throws IOException, EOFException { throw new UnsupportedOperationException( "Operation not supported: readUTF()" ); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public String readUTF() throws IOException, EOFException { throw new UnsupportedOperationException( "Operation not supported: readUTF()" ); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public String readUTF() throws IOException, EOFException { throw new UnsupportedOperationException( "Operation not supported: readUTF()" ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar();...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public String readUTF() throws IOException, EOFException { throw new UnsupportedOperationException( "Operation not supported: readUTF()" ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar();...
@Test public void eachText() { Document doc = Jsoup.parse("<div><p>1<p>2<p>3<p>4<p>5<p>6</div><div><p>7<p>8<p>9<p>10<p>11<p>12<p></p></div>"); List<String> divText = doc.select("div").eachText(); assertEquals(2, divText.size()); assertEquals("1 2 3 4 5 6", divText.get(0)); assertEquals("7 8 9 10 11 12", divText.get(1))...
public List<String> eachText() { ArrayList<String> texts = new ArrayList<>(size()); for (Element el: this) { if (el.hasText()) texts.add(el.text()); } return texts; }
Elements extends ArrayList<Element> { public List<String> eachText() { ArrayList<String> texts = new ArrayList<>(size()); for (Element el: this) { if (el.hasText()) texts.add(el.text()); } return texts; } }
Elements extends ArrayList<Element> { public List<String> eachText() { ArrayList<String> texts = new ArrayList<>(size()); for (Element el: this) { if (el.hasText()) texts.add(el.text()); } return texts; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elemen...
Elements extends ArrayList<Element> { public List<String> eachText() { ArrayList<String> texts = new ArrayList<>(size()); for (Element el: this) { if (el.hasText()) texts.add(el.text()); } return texts; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elemen...
Elements extends ArrayList<Element> { public List<String> eachText() { ArrayList<String> texts = new ArrayList<>(size()); for (Element el: this) { if (el.hasText()) texts.add(el.text()); } return texts; } Elements(); Elements(int initialCapacity); Elements(Collection<Element> elements); Elements(List<Element> elemen...
@Test public void testSkipBytes() throws IOException { this.sdis.skipBytes(4); assertEquals( 0x08070605, this.sdis.readInt() ); }
public int skipBytes( final int count ) throws IOException, EOFException { return (int)in.skip( count ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int skipBytes( final int count ) throws IOException, EOFException { return (int)in.skip( count ); } }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int skipBytes( final int count ) throws IOException, EOFException { return (int)in.skip( count ); } SwappedDataInputStream( final InputStream input ); }
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int skipBytes( final int count ) throws IOException, EOFException { return (int)in.skip( count ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFlo...
SwappedDataInputStream extends ProxyInputStream implements DataInput { public int skipBytes( final int count ) throws IOException, EOFException { return (int)in.skip( count ); } SwappedDataInputStream( final InputStream input ); boolean readBoolean(); byte readByte(); char readChar(); double readDouble(); float readFlo...
@SuppressWarnings("deprecation") @Test public void testMultiByteBreak() throws Exception { System.out.println("testMultiByteBreak() Default charset: "+Charset.defaultCharset().displayName()); final long delay = 50; final File origin = new File(this.getClass().getResource("/test-file-utf8.bin").toURI()); final File file...
private void stop(final Exception e) { listener.handle(e); stop(); }
Tailer implements Runnable { private void stop(final Exception e) { listener.handle(e); stop(); } }
Tailer implements Runnable { private void stop(final Exception e) { listener.handle(e); stop(); } Tailer(final File file, final TailerListener listener); Tailer(final File file, final TailerListener listener, final long delayMillis); Tailer(final File file, final TailerListener listener, final long delayMillis, final...
Tailer implements Runnable { private void stop(final Exception e) { listener.handle(e); stop(); } Tailer(final File file, final TailerListener listener); Tailer(final File file, final TailerListener listener, final long delayMillis); Tailer(final File file, final TailerListener listener, final long delayMillis, final...
Tailer implements Runnable { private void stop(final Exception e) { listener.handle(e); stop(); } Tailer(final File file, final TailerListener listener); Tailer(final File file, final TailerListener listener, final long delayMillis); Tailer(final File file, final TailerListener listener, final long delayMillis, final...
@Test public void testTailerEof() throws Exception { final long delay = 50; final File file = new File(getTestDirectory(), "tailer2-test.txt"); createFile(file, 0); final TestTailerListener listener = new TestTailerListener(); final Tailer tailer = new Tailer(file, listener, delay, false); final Thread thread = new Thr...
private void stop(final Exception e) { listener.handle(e); stop(); }
Tailer implements Runnable { private void stop(final Exception e) { listener.handle(e); stop(); } }
Tailer implements Runnable { private void stop(final Exception e) { listener.handle(e); stop(); } Tailer(final File file, final TailerListener listener); Tailer(final File file, final TailerListener listener, final long delayMillis); Tailer(final File file, final TailerListener listener, final long delayMillis, final...
Tailer implements Runnable { private void stop(final Exception e) { listener.handle(e); stop(); } Tailer(final File file, final TailerListener listener); Tailer(final File file, final TailerListener listener, final long delayMillis); Tailer(final File file, final TailerListener listener, final long delayMillis, final...
Tailer implements Runnable { private void stop(final Exception e) { listener.handle(e); stop(); } Tailer(final File file, final TailerListener listener); Tailer(final File file, final TailerListener listener, final long delayMillis); Tailer(final File file, final TailerListener listener, final long delayMillis, final...
@Test public void testTailer() throws Exception { final long delayMillis = 50; final File file = new File(getTestDirectory(), "tailer1-test.txt"); createFile(file, 0); final TestTailerListener listener = new TestTailerListener(); final String osname = System.getProperty("os.name"); final boolean isWindows = osname.star...
public Tailer(final File file, final TailerListener listener) { this(file, listener, DEFAULT_DELAY_MILLIS); }
Tailer implements Runnable { public Tailer(final File file, final TailerListener listener) { this(file, listener, DEFAULT_DELAY_MILLIS); } }
Tailer implements Runnable { public Tailer(final File file, final TailerListener listener) { this(file, listener, DEFAULT_DELAY_MILLIS); } Tailer(final File file, final TailerListener listener); Tailer(final File file, final TailerListener listener, final long delayMillis); Tailer(final File file, final TailerListene...
Tailer implements Runnable { public Tailer(final File file, final TailerListener listener) { this(file, listener, DEFAULT_DELAY_MILLIS); } Tailer(final File file, final TailerListener listener); Tailer(final File file, final TailerListener listener, final long delayMillis); Tailer(final File file, final TailerListene...
Tailer implements Runnable { public Tailer(final File file, final TailerListener listener) { this(file, listener, DEFAULT_DELAY_MILLIS); } Tailer(final File file, final TailerListener listener); Tailer(final File file, final TailerListener listener, final long delayMillis); Tailer(final File file, final TailerListene...