Source Code Cross Referenced for FileInfo.java in  » Workflow-Engines » wfmopen-2.1.1 » de » danet » an » util » multipartform » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » wfmopen 2.1.1 » de.danet.an.util.multipartform 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright(c) 2001 iSavvix Corporation (http://www.isavvix.com/)
003:         *
004:         *                        All rights reserved
005:         *
006:         * Permission to use, copy, modify and distribute this material for
007:         * any purpose and without fee is hereby granted, provided that the
008:         * above copyright notice and this permission notice appear in all
009:         * copies, and that the name of iSavvix Corporation not be used in
010:         * advertising or publicity pertaining to this material without the
011:         * specific, prior written permission of an authorized representative of
012:         * iSavvix Corporation.
013:         *
014:         * ISAVVIX CORPORATION MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES,
015:         * EXPRESS OR IMPLIED, WITH RESPECT TO THE SOFTWARE, INCLUDING, BUT
016:         * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
017:         * FITNESS FOR ANY PARTICULAR PURPOSE, AND THE WARRANTY AGAINST
018:         * INFRINGEMENT OF PATENTS OR OTHER INTELLECTUAL PROPERTY RIGHTS.  THE
019:         * SOFTWARE IS PROVIDED "AS IS", AND IN NO EVENT SHALL ISAVVIX CORPORATION OR
020:         * ANY OF ITS AFFILIATES BE LIABLE FOR ANY DAMAGES, INCLUDING ANY
021:         * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELATING
022:         * TO THE SOFTWARE.
023:         *
024:         */package de.danet.an.util.multipartform;
025:
026:        import java.io.File;
027:
028:        /**
029:         * This class is used as a data structure by HttpMultiPartParser.
030:         *
031:         * @see de.danet.an.util.multipartform.HttpMultiPartParser
032:         * @author  Anil Hemrajani
033:         */
034:        public class FileInfo {
035:            private String name = null, clientFileName = null,
036:                    fileContentType = null;
037:            private byte[] fileContents = null;
038:            private File file = null;
039:            private StringBuffer sb = new StringBuffer(100);
040:
041:            /** 
042:             * Sets the param name.
043:             * @param aName name to set.
044:             * @see #getName
045:             */
046:            public void setName(String aName) {
047:                name = aName;
048:            }
049:
050:            /** 
051:             * Gets the param name.
052:             * @return name
053:             * @see #setName
054:             */
055:            public String getName() {
056:                return name;
057:            }
058:
059:            /** 
060:             * Gets the file name.
061:             * @return name
062:             * @see #setClientFileName
063:             */
064:            public String getClientFileName() {
065:                return clientFileName;
066:            }
067:
068:            /** 
069:             * Sets the file name.
070:             * @param aClientFileName name to set.
071:             * @see #getClientFileName
072:             */
073:            public void setClientFileName(String aClientFileName) {
074:                clientFileName = aClientFileName;
075:            }
076:
077:            /** 
078:             * Sets the local file.
079:             * @param aFile file to set.
080:             * @see #getLocalFile
081:             */
082:            public void setLocalFile(File aFile) {
083:                file = aFile;
084:            }
085:
086:            /** 
087:             * Gets the file name.
088:             * @return name
089:             * @see #setLocalFile
090:             */
091:            public File getLocalFile() {
092:                return file;
093:            }
094:
095:            /** 
096:             * Gets the file contents.
097:             * @return file content
098:             * @see #setFileContents
099:             */
100:            public byte[] getFileContents() {
101:                return fileContents;
102:            }
103:
104:            /** 
105:             * Sets the file contents.
106:             * @param aByteArray file contents to set.
107:             * @see #getFileContents
108:             */
109:            public void setFileContents(byte[] aByteArray) {
110:                fileContents = new byte[aByteArray.length];
111:                System.arraycopy(aByteArray, 0, fileContents, 0,
112:                        aByteArray.length);
113:            }
114:
115:            /** 
116:             * Gets the file content type.
117:             * @return file content type
118:             * @see #setFileContentType
119:             */
120:            public String getFileContentType() {
121:                return fileContentType;
122:            }
123:
124:            /** 
125:             * Sets the file content type.
126:             * @param aContentType file content type to set.
127:             * @see #getFileContentType
128:             */
129:            public void setFileContentType(String aContentType) {
130:                fileContentType = aContentType;
131:            }
132:
133:            /**
134:             * String represantion.
135:             * @return String represantion
136:             */
137:            public String toString() {
138:                sb.setLength(0);
139:                sb.append("               name = " + name + "\n");
140:                sb.append("     clientFileName = " + clientFileName + "\n");
141:
142:                if (file != null)
143:                    sb.append("      File.toString = " + file + " (size="
144:                            + file.length() + ")\n");
145:                else
146:                    sb.append("fileContents.length = " + fileContents.length
147:                            + "\n");
148:
149:                return sb.toString();
150:            }
151:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.