Source Code Cross Referenced for DataOutput.java in  » Apache-Harmony-Java-SE » java-package » java » io » 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 » Apache Harmony Java SE » java package » java.io 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */
017:
018:        package java.io;
019:
020:        /**
021:         * DataOutput is an interface which declares methods for writing typed data to a
022:         * Stream. Typically, this stream can be read in by a class which implements
023:         * DataInput. Types that can be written include byte, 16-bit short, 32-bit int,
024:         * 32-bit float, 64-bit long, 64-bit double, byte strings, and UTF Strings.
025:         * 
026:         * @see DataOutputStream
027:         * @see RandomAccessFile
028:         */
029:        public interface DataOutput {
030:
031:            /**
032:             * Writes the entire contents of the byte array <code>buffer</code> to the
033:             * OutputStream.
034:             * 
035:             * @param buffer
036:             *            the buffer to be written
037:             * 
038:             * @throws IOException
039:             *             If an error occurs attempting to write to this stream.
040:             * 
041:             * @see DataInput#readFully(byte[])
042:             * @see DataInput#readFully(byte[], int, int)
043:             */
044:            public abstract void write(byte buffer[]) throws IOException;
045:
046:            /**
047:             * Writes <code>count</code> <code>bytes</code> from the byte array
048:             * <code>buffer</code> starting at offset <code>index</code> to the
049:             * OutputStream.
050:             * 
051:             * @param buffer
052:             *            the buffer to be written
053:             * @param offset
054:             *            offset in buffer to get bytes
055:             * @param count
056:             *            number of bytes in buffer to write
057:             * 
058:             * @throws IOException
059:             *             If an error occurs attempting to write to this stream.
060:             * 
061:             * @see DataInput#readFully(byte[])
062:             * @see DataInput#readFully(byte[], int, int)
063:             */
064:            public abstract void write(byte buffer[], int offset, int count)
065:                    throws IOException;
066:
067:            /**
068:             * Writes the specified <code>byte</code> to the OutputStream.
069:             * 
070:             * @param oneByte
071:             *            the byte to be written
072:             * 
073:             * @throws IOException
074:             *             If an error occurs attempting to write to this stream.
075:             * 
076:             * @see DataInput#readByte()
077:             */
078:            public abstract void write(int oneByte) throws IOException;
079:
080:            /**
081:             * Writes a boolean to this output stream.
082:             * 
083:             * @param val
084:             *            the boolean value to write to the OutputStream
085:             * 
086:             * @throws IOException
087:             *             If an error occurs attempting to write to this stream.
088:             * 
089:             * @see DataInput#readBoolean()
090:             */
091:            public abstract void writeBoolean(boolean val) throws IOException;
092:
093:            /**
094:             * Writes a 8-bit byte to this output stream.
095:             * 
096:             * @param val
097:             *            the byte value to write to the OutputStream
098:             * 
099:             * @throws IOException
100:             *             If an error occurs attempting to write to this stream.
101:             * 
102:             * @see DataInput#readByte()
103:             * @see DataInput#readUnsignedByte()
104:             */
105:            public abstract void writeByte(int val) throws IOException;
106:
107:            /**
108:             * Writes the low order 8-bit bytes from a String to this output stream.
109:             * 
110:             * @param str
111:             *            the String containing the bytes to write to the OutputStream
112:             * 
113:             * @throws IOException
114:             *             If an error occurs attempting to write to this stream.
115:             * 
116:             * @see DataInput#readFully(byte[])
117:             * @see DataInput#readFully(byte[],int,int)
118:             */
119:            public abstract void writeBytes(String str) throws IOException;
120:
121:            /**
122:             * Writes the specified 16-bit character to the OutputStream. Only the lower
123:             * 2 bytes are written with the higher of the 2 bytes written first. This
124:             * represents the Unicode value of val.
125:             * 
126:             * @param oneByte
127:             *            the character to be written
128:             * 
129:             * @throws IOException
130:             *             If an error occurs attempting to write to this stream.
131:             * 
132:             * @see DataInput#readChar()
133:             */
134:            public abstract void writeChar(int oneByte) throws IOException;
135:
136:            /**
137:             * Writes the specified 16-bit characters contained in str to the
138:             * OutputStream. Only the lower 2 bytes of each character are written with
139:             * the higher of the 2 bytes written first. This represents the Unicode
140:             * value of each character in str.
141:             * 
142:             * @param str
143:             *            the String whose characters are to be written.
144:             * 
145:             * @throws IOException
146:             *             If an error occurs attempting to write to this stream.
147:             * 
148:             * @see DataInput#readChar()
149:             */
150:            public abstract void writeChars(String str) throws IOException;
151:
152:            /**
153:             * Writes a 64-bit double to this output stream. The resulting output is the
154:             * 8 bytes resulting from calling Double.doubleToLongBits().
155:             * 
156:             * @param val
157:             *            the double to be written.
158:             * 
159:             * @throws IOException
160:             *             If an error occurs attempting to write to this stream.
161:             * 
162:             * @see DataInput#readDouble()
163:             */
164:            public abstract void writeDouble(double val) throws IOException;
165:
166:            /**
167:             * Writes a 32-bit float to this output stream. The resulting output is the
168:             * 4 bytes resulting from calling Float.floatToIntBits().
169:             * 
170:             * @param val
171:             *            the float to be written.
172:             * 
173:             * @throws IOException
174:             *             If an error occurs attempting to write to this stream.
175:             * 
176:             * @see DataInput#readFloat()
177:             */
178:            public abstract void writeFloat(float val) throws IOException;
179:
180:            /**
181:             * Writes a 32-bit int to this output stream. The resulting output is the 4
182:             * bytes, highest order first, of val.
183:             * 
184:             * @param val
185:             *            the int to be written.
186:             * 
187:             * @throws IOException
188:             *             If an error occurs attempting to write to this stream.
189:             * 
190:             * @see DataInput#readInt()
191:             */
192:            public abstract void writeInt(int val) throws IOException;
193:
194:            /**
195:             * Writes a 64-bit long to this output stream. The resulting output is the 8
196:             * bytes, highest order first, of val.
197:             * 
198:             * @param val
199:             *            the long to be written.
200:             * 
201:             * @throws IOException
202:             *             If an error occurs attempting to write to this stream.
203:             * 
204:             * @see DataInput#readLong()
205:             */
206:            public abstract void writeLong(long val) throws IOException;
207:
208:            /**
209:             * Writes the specified 16-bit short to the OutputStream. Only the lower 2
210:             * bytes are written with the higher of the 2 bytes written first.
211:             * 
212:             * @param val
213:             *            the short to be written
214:             * 
215:             * @throws IOException
216:             *             If an error occurs attempting to write to this stream.
217:             * 
218:             * @see DataInput#readShort()
219:             * @see DataInput#readUnsignedShort()
220:             */
221:            public abstract void writeShort(int val) throws IOException;
222:
223:            /**
224:             * Writes the specified String out in UTF format.
225:             * 
226:             * @param str
227:             *            the String to be written in UTF format.
228:             * 
229:             * @throws IOException
230:             *             If an error occurs attempting to write to this stream.
231:             * 
232:             * @see DataInput#readUTF()
233:             */
234:            public abstract void writeUTF(String str) throws IOException;
235:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.