Merge "Start of the COPS message refactoring to make all of these classes more semant...
[packetcable.git] / packetcable-driver / src / main / java / org / umu / cops / stack / COPSIpv6LastPdpAddr.java
1 /*\r
2  * Copyright (c) 2003 University of Murcia.  All rights reserved.\r
3  * --------------------------------------------------------------\r
4  * For more information, please see <http://www.umu.euro6ix.org/>.\r
5  */\r
6 \r
7 package org.umu.cops.stack;\r
8 \r
9 import java.io.IOException;\r
10 import java.io.OutputStream;\r
11 \r
12 /**\r
13  * COPS IPv6 Last PDP Address\r
14  *\r
15  * @version COPSIpv6LastPdpAddr.java, v 1.00 2003\r
16  *\r
17  */\r
18 public class COPSIpv6LastPdpAddr extends COPSIpv6PdpAddress {\r
19 \r
20     public COPSIpv6LastPdpAddr() {\r
21         super();\r
22         // TODO - FIXME later, currently not in use and the header is now immutable\r
23 //        _objHdr.setCNum(COPSObjHeader.COPS_LAST_PDP_ADDR);\r
24     }\r
25 \r
26     public COPSIpv6LastPdpAddr(byte[] dataPtr) {\r
27         super(dataPtr);\r
28     }\r
29 \r
30     /**\r
31      * Method isLastPdpAddress\r
32      *\r
33      * @return   a boolean\r
34      *\r
35      */\r
36     public boolean isLastPdpAddress() {\r
37         return true;\r
38     }\r
39 \r
40     /**\r
41      * Write an object textual description in the output stream\r
42      *\r
43      * @param    os                  an OutputStream\r
44      *\r
45      * @throws   IOException\r
46      *\r
47      */\r
48     public void dump(OutputStream os) throws IOException {\r
49         _objHdr.dump(os);\r
50         os.write(new String("Ipv6PdpAddress" + "\n").getBytes());\r
51         os.write(new String("Address: " + _addr.getIpName() + "\n").getBytes());\r
52         os.write(new String("Port: " + _tcpPort + "\n").getBytes());\r
53     }\r
54 };\r