View Javadoc
1   /**
2    * Copyright (C) 2003-2007 eXo Platform SAS.
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Affero General Public License
6    * as published by the Free Software Foundation; either version 3
7    * of the License, or (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program; if not, see<http://www.gnu.org/licenses/>.
16   **/
17  package org.exoplatform.calendar.service;
18  
19  import java.io.InputStream;
20  
21  /**
22   * Created by The eXo Platform SARL
23   * Author : Hung Nguyen Quang
24   *          hung.nguyen@exoplatform.com
25   * Jul 11, 2007  
26   */
27  public class FeedData {
28    private String title;
29  
30    private String url;
31  
32    private byte[] content = null;
33  
34    public String getFeed() {
35      return title;
36    }
37  
38    public String getTitle() {
39      return title;
40    }
41  
42    public void setTitle(String title) {
43      this.title = title;
44    }
45  
46    public String getUrl() {
47      return url;
48    }
49  
50    public void setUrl(String url) {
51      this.url = url;
52    }
53  
54    public void setContent(InputStream input) throws Exception {
55      if (input != null) {
56        content = new byte[input.available()];
57        input.read(content);
58      } else
59        content = null;
60    }
61  
62    public byte[] getContent() {
63      return content;
64    }
65  }