001    /*
002     Copyright (C) 2003 Adam Olsen
003    
004     This program is free software; you can redistribute it and/or modify
005     it under the terms of the GNU General Public License as published by
006     the Free Software Foundation; either version 1, or (at your option)
007     any later version.
008    
009     This program is distributed in the hope that it will be useful,
010     but WITHOUT ANY WARRANTY; without even the implied warranty of
011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012     GNU General Public License for more details.
013    
014     You should have received a copy of the GNU General Public License
015     along with this program; if not, write to the Free Software
016     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
017     */
018    
019    package com.valhalla.jbother.jabber.smack;
020    
021    import org.jivesoftware.smack.packet.Packet;
022    
023    /**
024     * Blank packet for creating user-defined packets
025     * 
026     * @author Andrey Zakirov
027     * @version 1.0
028     */
029    public class Blank extends Packet {
030        private String text = null;
031    
032        /**
033         * Default constructor - sets up the packet with no information
034         */
035        public Blank() {
036            this.text = "";
037        }
038    
039        /**
040         * Sets up the packet with information
041         * 
042         * @param text
043         *            user-defined packet text
044         */
045    
046        public Blank(String text) {
047            this.text = text;
048        }
049    
050        /**
051         * Builds the packet
052         * 
053         * @return the XML version of the packet
054         */
055        public String toXML() {
056            return text;
057        }
058    }