@Test public void testValidParse() throws SdpException { String line = "c=IN IP6 0.0.0.0\n\r"; ConnectionField connection = parser.parse(line); Assert.assertEquals("IN", connection.getNetworkType()); Assert.assertEquals("IP6", connection.getAddressType()); Assert.assertEquals("0.0.0.0", connection.getAddress()); }
@Override public ConnectionField parse(String sdp) throws SdpException { try { String[] values = sdp.trim().substring(2).split(" "); String networkType = values[0]; String addressType = values[1]; String address = values[2]; return new ConnectionField(networkType, addressType, address); } catch (Exception e) { throw new SdpException(PARSE_ERROR + sdp, e); } }
ConnectionFieldParser implements SdpParser<ConnectionField> { @Override public ConnectionField parse(String sdp) throws SdpException { try { String[] values = sdp.trim().substring(2).split(" "); String networkType = values[0]; String addressType = values[1]; String address = values[2]; return new ConnectionField(networkType, addressType, address); } catch (Exception e) { throw new SdpException(PARSE_ERROR + sdp, e); } } }
ConnectionFieldParser implements SdpParser<ConnectionField> { @Override public ConnectionField parse(String sdp) throws SdpException { try { String[] values = sdp.trim().substring(2).split(" "); String networkType = values[0]; String addressType = values[1]; String address = values[2]; return new ConnectionField(networkType, addressType, address); } catch (Exception e) { throw new SdpException(PARSE_ERROR + sdp, e); } }  }
ConnectionFieldParser implements SdpParser<ConnectionField> { @Override public ConnectionField parse(String sdp) throws SdpException { try { String[] values = sdp.trim().substring(2).split(" "); String networkType = values[0]; String addressType = values[1]; String address = values[2]; return new ConnectionField(networkType, addressType, address); } catch (Exception e) { throw new SdpException(PARSE_ERROR + sdp, e); } }  @Override boolean canParse(String sdp); @Override ConnectionField parse(String sdp); @Override void parse(ConnectionField field, String sdp); }
ConnectionFieldParser implements SdpParser<ConnectionField> { @Override public ConnectionField parse(String sdp) throws SdpException { try { String[] values = sdp.trim().substring(2).split(" "); String networkType = values[0]; String addressType = values[1]; String address = values[2]; return new ConnectionField(networkType, addressType, address); } catch (Exception e) { throw new SdpException(PARSE_ERROR + sdp, e); } }  @Override boolean canParse(String sdp); @Override ConnectionField parse(String sdp); @Override void parse(ConnectionField field, String sdp);  }