2 * jSite2 - PeerNote.java -
3 * Copyright © 2008 David Roden
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 package net.pterodactylus.fcp;
23 * The “PeerNote” message contains a private note that has been entered for a
26 * @author <a href="mailto:dr@ina-germany.de">David Roden</a>
29 public class PeerNote extends BaseMessage {
31 /** The type for base64 encoded peer notes. */
32 public static final int TYPE_PRIVATE_PEER_NOTE = 1;
35 * Creates a “PeerNote” message that wraps the recevied message.
37 * @param receivedMessage
38 * The received message
40 PeerNote(FcpMessage receivedMessage) {
41 super(receivedMessage);
45 * Returns the base64-encoded note text.
47 * @return The note text
49 public String getNoteText() {
50 return getField("NoteText");
54 * Returns the type of the peer note.
56 * @return The type of the peer note, or <code>-1</code> if the type can
59 public int getPeerNoteType() {
60 return FcpUtils.safeParseInt(getField("PeerNoteType"));