@Test public void testFromBytes() throws IOException { final byte[] encodedAsBytes = getEncodedAsBytes(); final NATTraversalTechniqueAttribute actualResult = NATTraversalTechniqueAttribute.fromBytes(encodedAsBytes, null); assertEquals(this.attr, actualResult); }
public static NATTraversalTechniqueAttribute fromBytes(final byte[] encoded, final AttributeHeader header) throws IOException, MessageFormatException { final ByteArrayInputStream bin = new ByteArrayInputStream(encoded); final DataInputStream din = new DataInputStream(bin); final int travTech = din.readInt(); return new NATTraversalTechniqueAttribute(travTech); }
NATTraversalTechniqueAttribute implements Attribute { public static NATTraversalTechniqueAttribute fromBytes(final byte[] encoded, final AttributeHeader header) throws IOException, MessageFormatException { final ByteArrayInputStream bin = new ByteArrayInputStream(encoded); final DataInputStream din = new DataInputStream(bin); final int travTech = din.readInt(); return new NATTraversalTechniqueAttribute(travTech); } }
NATTraversalTechniqueAttribute implements Attribute { public static NATTraversalTechniqueAttribute fromBytes(final byte[] encoded, final AttributeHeader header) throws IOException, MessageFormatException { final ByteArrayInputStream bin = new ByteArrayInputStream(encoded); final DataInputStream din = new DataInputStream(bin); final int travTech = din.readInt(); return new NATTraversalTechniqueAttribute(travTech); } NATTraversalTechniqueAttribute(final int encoded); }
NATTraversalTechniqueAttribute implements Attribute { public static NATTraversalTechniqueAttribute fromBytes(final byte[] encoded, final AttributeHeader header) throws IOException, MessageFormatException { final ByteArrayInputStream bin = new ByteArrayInputStream(encoded); final DataInputStream din = new DataInputStream(bin); final int travTech = din.readInt(); return new NATTraversalTechniqueAttribute(travTech); } NATTraversalTechniqueAttribute(final int encoded); int getEncoded(); @Override AttributeType getType(); @Override int getLength(); @Override void writeTo(final OutputStream out); @Override int hashCode(); @Override boolean equals(Object obj); static NATTraversalTechniqueAttribute fromBytes(final byte[] encoded, final AttributeHeader header); }
NATTraversalTechniqueAttribute implements Attribute { public static NATTraversalTechniqueAttribute fromBytes(final byte[] encoded, final AttributeHeader header) throws IOException, MessageFormatException { final ByteArrayInputStream bin = new ByteArrayInputStream(encoded); final DataInputStream din = new DataInputStream(bin); final int travTech = din.readInt(); return new NATTraversalTechniqueAttribute(travTech); } NATTraversalTechniqueAttribute(final int encoded); int getEncoded(); @Override AttributeType getType(); @Override int getLength(); @Override void writeTo(final OutputStream out); @Override int hashCode(); @Override boolean equals(Object obj); static NATTraversalTechniqueAttribute fromBytes(final byte[] encoded, final AttributeHeader header);  }