@Test public void testGetLength() throws OperationException { System.out.println("getLength"); BinaryField instance = new BinaryField(Types.BLOB); assert (instance.getLength() < 0); instance = new BinaryField(Types.BLOB, "10"); assertEquals(10, instance.getLength()); instance = new BinaryField(Types.BLOB, "10K"); assertEquals(10 * 1024, instance.getLength()); instance = new BinaryField(Types.BLOB, "20M"); assertEquals(20 * 1024 * 1024, instance.getLength()); instance = new BinaryField(Types.BLOB, "30G"); assertEquals(30 * 1024 * 1024 * 1024, instance.getLength()); }
public long getLength() { return length; }
BinaryField implements FieldType<byte[]> { public long getLength() { return length; } }
BinaryField implements FieldType<byte[]> { public long getLength() { return length; } BinaryField(Types type);  BinaryField(Types type, String lengthString); }
BinaryField implements FieldType<byte[]> { public long getLength() { return length; } BinaryField(Types type);  BinaryField(Types type, String lengthString); @Override Types getType(); long getLength(); @Override byte[] getDefaultValue(); @Override boolean hasDefaultValue(); @Override byte[] convert(Object objValue); @Override JSONObject toJson(); }
BinaryField implements FieldType<byte[]> { public long getLength() { return length; } BinaryField(Types type);  BinaryField(Types type, String lengthString); @Override Types getType(); long getLength(); @Override byte[] getDefaultValue(); @Override boolean hasDefaultValue(); @Override byte[] convert(Object objValue); @Override JSONObject toJson();  }