KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > za > org > coefficient > util > common > FileDownloadData


1 /*
2  * Coefficient - facilitates project based collaboration
3  * Copyright (C) 2003, Dylan Etkin, CSIR icomtek
4  * PO Box 395
5  * Pretoria 0001, RSA
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  * This library 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 GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19 package za.org.coefficient.util.common;
20
21 /**
22  * @author <a HREF="mailto:leon@psybergate.com">Leon Messerschmidt</a>
23  *
24  */

25 public class FileDownloadData {
26   
27   /////////////////////////////////////////////////////////////////////////////
28
// Object Variables
29
/////////////////////////////////////////////////////////////////////////////
30
/**
31    * An array of bytes that contains the raw data for the file that will be
32    * downloaded.
33    */

34   private byte[] bytes;
35   /**
36    * The name of the file
37    */

38   private String JavaDoc filename;
39   /**
40    * The mime-type of the file
41    */

42   private String JavaDoc mimeType;
43
44   /////////////////////////////////////////////////////////////////////////////
45
// Object Mutators
46
/////////////////////////////////////////////////////////////////////////////
47

48   /**
49    * @param bs
50    */

51   public void setBytes(byte[] bs) {
52     bytes = bs;
53   }
54
55   /**
56    * @param string
57    */

58   public void setFilename(String JavaDoc string) {
59     filename = string;
60   }
61
62   /**
63    * @param string
64    */

65   public void setMimeType(String JavaDoc string) {
66     mimeType = string;
67   }
68
69   /////////////////////////////////////////////////////////////////////////////
70
// Object Accessors
71
/////////////////////////////////////////////////////////////////////////////
72

73   /**
74    * @return
75    */

76   public byte[] getBytes() {
77     return bytes;
78   }
79
80   /**
81    * @return
82    */

83   public String JavaDoc getFilename() {
84     return filename;
85   }
86
87   /**
88    * @return
89    */

90   public String JavaDoc getMimeType() {
91     return mimeType;
92   }
93
94 }
95
Popular Tags