/** * 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 * @param cause cause * @return a new IllegalIpV6Option object. */ public static IllegalIpV6Option newInstance( byte[] rawData, int offset, int length, IllegalRawDataException cause) { if (cause == null) { throw new NullPointerException("cause is null."); } ByteArrays.validateBounds(rawData, offset, length); return new IllegalIpV6Option(rawData, offset, length, cause); }
/** * A static factory method. This method validates the arguments by {@link * ByteArrays#validateBounds(byte[], int, int)}, which may throw exceptions undocumented here. * * @param rawData * @param offset * @param length * @return a new IcmpV4RedirectPacket object. * @throws IllegalRawDataException */ public static IcmpV4RedirectPacket newPacket(byte[] rawData, int offset, int length) throws IllegalRawDataException { ByteArrays.validateBounds(rawData, offset, length); IcmpV4RedirectHeader header = new IcmpV4RedirectHeader(rawData, offset, length); int payloadLength = length - header.length(); if (payloadLength > 0) { return new IcmpV4RedirectPacket(header, rawData, offset + header.length(), payloadLength); } else { return new IcmpV4RedirectPacket(header); } }
/** * A static factory method. This method validates the arguments by {@link * ByteArrays#validateBounds(byte[], int, int)}, which may throw exceptions undocumented here. * * @param rawData * @param offset * @param length * @return a new IcmpV6NeighborAdvertisementPacket object. * @throws IllegalRawDataException */ public static IcmpV6NeighborAdvertisementPacket newPacket(byte[] rawData, int offset, int length) throws IllegalRawDataException { ByteArrays.validateBounds(rawData, offset, length); return new IcmpV6NeighborAdvertisementPacket(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 * @param offset * @param length * @return a new IpV4InternetTimestampOptionTimestampsWithAddresses object. * @throws IllegalRawDataException */ public static IpV4InternetTimestampOptionTimestampsWithAddresses newInstance( byte[] rawData, int offset, int length) throws IllegalRawDataException { ByteArrays.validateBounds(rawData, offset, length); return new IpV4InternetTimestampOptionTimestampsWithAddresses(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 * @param offset * @param length * @return a new IpV4StrictSourceRouteOption object. * @throws IllegalRawDataException */ public static IpV4StrictSourceRouteOption newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException { ByteArrays.validateBounds(rawData, offset, length); return new IpV4StrictSourceRouteOption(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 UnknownIpV6NeighborDiscoveryOption object. * @throws IllegalRawDataException if parsing the raw data fails. */ public static UnknownIpV6NeighborDiscoveryOption newInstance( byte[] rawData, int offset, int length) throws IllegalRawDataException { ByteArrays.validateBounds(rawData, offset, length); return new UnknownIpV6NeighborDiscoveryOption(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 RadiotapRate object. * @throws IllegalRawDataException if parsing the raw data fails. */ public static RadiotapDataRate newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException { ByteArrays.validateBounds(rawData, offset, length); return new RadiotapDataRate(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 * @param offset * @param length * @return a new EncryptedPacket object. */ public static EncryptedPacket newPacket(byte[] rawData, int offset, int length) { ByteArrays.validateBounds(rawData, offset, length); return new EncryptedPacket(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 * @param offset * @param length * @return a new TcpSackOption object. * @throws IllegalRawDataException */ public static TcpSackOption newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException { ByteArrays.validateBounds(rawData, offset, length); return new TcpSackOption(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 IllegalIpV4InternetTimestampOptionData object. */ public static IllegalIpV4InternetTimestampOptionData newInstance( byte[] rawData, int offset, int length) { ByteArrays.validateBounds(rawData, offset, length); return new IllegalIpV4InternetTimestampOptionData(rawData, offset, length); }