@Test public void testToNullValue() throws Exception { assertNull(typeConverter.to(new byte[] { (byte)0, (byte)0 }, 0, 2, -1, true)); }
@Override public Object to(byte[] bytes, int offset, int length, int decimals, boolean removePadding) { if(ByteUtils.allEquals(bytes, this.nullFillerByte, offset, bytes.length)) { if(this.defaultValue != null) { return this.defaultValue; } else { return null; } } else { return getString(bytes, offset, length, removePadding, 0); } }
StringToString extends TypeConverterBase { @Override public Object to(byte[] bytes, int offset, int length, int decimals, boolean removePadding) { if(ByteUtils.allEquals(bytes, this.nullFillerByte, offset, bytes.length)) { if(this.defaultValue != null) { return this.defaultValue; } else { return null; } } else { return getString(bytes, offset, length, removePadding, 0); } } }
StringToString extends TypeConverterBase { @Override public Object to(byte[] bytes, int offset, int length, int decimals, boolean removePadding) { if(ByteUtils.allEquals(bytes, this.nullFillerByte, offset, bytes.length)) { if(this.defaultValue != null) { return this.defaultValue; } else { return null; } } else { return getString(bytes, offset, length, removePadding, 0); } }  }
StringToString extends TypeConverterBase { @Override public Object to(byte[] bytes, int offset, int length, int decimals, boolean removePadding) { if(ByteUtils.allEquals(bytes, this.nullFillerByte, offset, bytes.length)) { if(this.defaultValue != null) { return this.defaultValue; } else { return null; } } else { return getString(bytes, offset, length, removePadding, 0); } }  @Override void validate(Class<?> type, int size, int decimals); @Override Object to(byte[] bytes, int offset, int length, int decimals, boolean removePadding); @Override byte[] from(Object value, int length, int decimals, boolean addPadding); }
StringToString extends TypeConverterBase { @Override public Object to(byte[] bytes, int offset, int length, int decimals, boolean removePadding) { if(ByteUtils.allEquals(bytes, this.nullFillerByte, offset, bytes.length)) { if(this.defaultValue != null) { return this.defaultValue; } else { return null; } } else { return getString(bytes, offset, length, removePadding, 0); } }  @Override void validate(Class<?> type, int size, int decimals); @Override Object to(byte[] bytes, int offset, int length, int decimals, boolean removePadding); @Override byte[] from(Object value, int length, int decimals, boolean addPadding);  }