@Override public SctpChunk newInstance(byte[] rawData, int offset, int length) { try { return UnknownSctpChunk.newInstance(rawData, offset, length); } catch (IllegalRawDataException e) { return IllegalSctpChunk.newInstance(rawData, offset, length); } }
@Override public SctpChunk newInstance(byte[] rawData, int offset, int length, SctpChunkType 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 IllegalSctpChunk.newInstance(rawData, offset, length); } return newInstance(rawData, offset, length); }
} catch (InvocationTargetException e) { if (e.getTargetException() instanceof IllegalRawDataException) { return IllegalSctpChunk.newInstance(rawData, offset, length);
@Override public SctpChunk newInstance(byte[] rawData, int offset, int length) { try { return UnknownSctpChunk.newInstance(rawData, offset, length); } catch (IllegalRawDataException e) { return IllegalSctpChunk.newInstance(rawData, offset, length); } }
@Override public SctpChunk newInstance(byte[] rawData, int offset, int length, SctpChunkType 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 IllegalSctpChunk.newInstance(rawData, offset, length); } return newInstance(rawData, offset, length); }
} catch (InvocationTargetException e) { if (e.getTargetException() instanceof IllegalRawDataException) { return IllegalSctpChunk.newInstance(rawData, offset, length);