@Override public IpV6RoutingData newInstance(byte[] rawData, int offset, int length) { try { return UnknownIpV6RoutingData.newInstance(rawData, offset, length); } catch (IllegalRawDataException e) { return IllegalIpV6RoutingData.newInstance(rawData, offset, length); } }
/** * A static factory method. This method validates the arguments by {@link * ByteArrays#validateBounds(byte[], int, int)}, which may throw exceptions undocumented here. * * @param rawData rawData * @param offset offset * @param length length * @return a new IllegalIpV6RoutingData object. */ public static IllegalIpV6RoutingData newInstance(byte[] rawData, int offset, int length) { ByteArrays.validateBounds(rawData, offset, length); return new IllegalIpV6RoutingData(rawData, offset, length); }
@Override public IpV6RoutingData newInstance( byte[] rawData, int offset, int length, IpV6RoutingType number) { if (rawData == null || number == null) { StringBuilder sb = new StringBuilder(40); sb.append("rawData: ").append(rawData).append(" number: ").append(number); throw new NullPointerException(sb.toString()); } try { Instantiater instantiater = instantiaters.get(number); if (instantiater != null) { return instantiater.newInstance(rawData, offset, length); } } catch (IllegalRawDataException e) { return IllegalIpV6RoutingData.newInstance(rawData, offset, length); } return newInstance(rawData, offset, length); }
/** * A static factory method. This method validates the arguments by {@link * ByteArrays#validateBounds(byte[], int, int)}, which may throw exceptions undocumented here. * * @param rawData rawData * @param offset offset * @param length length * @return a new IllegalIpV6RoutingData object. */ public static IllegalIpV6RoutingData newInstance(byte[] rawData, int offset, int length) { ByteArrays.validateBounds(rawData, offset, length); return new IllegalIpV6RoutingData(rawData, offset, length); }
} catch (InvocationTargetException e) { if (e.getTargetException() instanceof IllegalRawDataException) { return IllegalIpV6RoutingData.newInstance(rawData, offset, length);
@Override public IpV6RoutingData newInstance(byte[] rawData, int offset, int length) { try { return UnknownIpV6RoutingData.newInstance(rawData, offset, length); } catch (IllegalRawDataException e) { return IllegalIpV6RoutingData.newInstance(rawData, offset, length); } }
@Override public IpV6RoutingData newInstance( byte[] rawData, int offset, int length, IpV6RoutingType number) { if (rawData == null || number == null) { StringBuilder sb = new StringBuilder(40); sb.append("rawData: ").append(rawData).append(" number: ").append(number); throw new NullPointerException(sb.toString()); } try { Instantiater instantiater = instantiaters.get(number); if (instantiater != null) { return instantiater.newInstance(rawData, offset, length); } } catch (IllegalRawDataException e) { return IllegalIpV6RoutingData.newInstance(rawData, offset, length); } return newInstance(rawData, offset, length); }
} catch (InvocationTargetException e) { if (e.getTargetException() instanceof IllegalRawDataException) { return IllegalIpV6RoutingData.newInstance(rawData, offset, length);