Java Doc for CorruptRandomAccessFile.java in  » Database-DBMS » db-derby-10.2 » org » apache » derbyTesting » functionTests » util » corruptio » 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 » Database DBMS » db derby 10.2 » org.apache.derbyTesting.functionTests.util.corruptio 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derbyTesting.functionTests.util.corruptio.CorruptRandomAccessFile

CorruptRandomAccessFile
public class CorruptRandomAccessFile implements StorageRandomAccessFile(Code)
This class provides a proxy implementation of the StorageRandomAccess File interface. It is used by CorruptDiskStorageFactory to instrument the database engine i/o for testing puproses. How the i/o operation are corrupted is based on the values set in the instance of the Singleton CorruptibleIo class by the tests. Methods in this class functon similar to java.io.RandomAccessFile except when modified to perform the corruptios.
author:
   Suresh Thalamati
version:
   1.0
See Also:   java.io.RandomAccessFile
See Also:   StorageRandomAccessFile



Constructor Summary
 CorruptRandomAccessFile(StorageRandomAccessFile raf, File realFile)
    

Method Summary
public  voidclose()
     Closes this file.
public  longgetFilePointer()
     Get the current offset in this file.
public  longlength()
     Gets the length of this file.
public  booleanreadBoolean()
     Reads a byte and returns true if the byte is not zero otherwise false.
public  bytereadByte()
     returns one input byte from the stream.
public  charreadChar()
     returns a char value from the stream.
public  doublereadDouble()
     returns a double from the stream.
public  floatreadFloat()
     returns a float from the stream.
public  voidreadFully(byte b)
     Reads some bytes from an input stream into the byte array.
public  voidreadFully(byte b, int off, int len)
     Reads the specified number of bytes from an input stream.
public  intreadInt()
     returns an Int from the stream.
public  StringreadLine()
     returns the next line of text from the input stream.
public  longreadLong()
     returns a long from the stream.
public  shortreadShort()
     returns a short value from the stream.
public  StringreadUTF()
     returns a string that has been encoded using in the UTF-8 format.
public  intreadUnsignedByte()
     Reads one input byte in the unsigned form.
public  intreadUnsignedShort()
     returns unsigned short.
public  voidseek(long newFilePointer)
     Set the file pointer.
public  voidsetLength(long newLength)
     Sets the length of this file, either extending or truncating it.
public  intskipBytes(int nBytes)
    
public  voidsync(boolean metaData)
     Force any changes out to the persistent store.
public  voidwrite(int b)
     Writes an int to the output stream .
public  voidwrite(byte b)
     Writes all the bytes in array to the stream.
public  voidwrite(byte b, int off, int len)
     Writes specified number bytes from array to the stream.
public  voidwriteBoolean(boolean value)
     Writes a boolean value to this output stream.
public  voidwriteByte(int value)
     Writes to the eight low-order bits of ant int.
public  voidwriteBytes(String str)
     Writes a string as bytes to the stream.
public  voidwriteChar(int value)
     Writes a char value to the output stream.
public  voidwriteChars(String str)
     Writes the string to the stream.
public  voidwriteDouble(double value)
     Writes a a double value to the stream.
public  voidwriteFloat(float value)
     Writes a float value to the output stream.
public  voidwriteInt(int value)
     Writes an int value to the output stream.
public  voidwriteLong(long value)
     Writes a long value to the output stream.
public  voidwriteShort(int value)
    
public  voidwriteUTF(String str)
     Writes the string in the utf format.


Constructor Detail
CorruptRandomAccessFile
CorruptRandomAccessFile(StorageRandomAccessFile raf, File realFile)(Code)
Construct a CorruptRandomAccessFile
Parameters:
  raf - The real random access file to which calls are delegated frothis proxy class.




Method Detail
close
public void close() throws IOException(Code)
Closes this file.



getFilePointer
public long getFilePointer() throws IOException(Code)
Get the current offset in this file.



length
public long length() throws IOException(Code)
Gets the length of this file.



readBoolean
public boolean readBoolean() throws IOException(Code)
Reads a byte and returns true if the byte is not zero otherwise false.



readByte
public byte readByte() throws IOException(Code)
returns one input byte from the stream.



readChar
public char readChar() throws IOException(Code)
returns a char value from the stream.



readDouble
public double readDouble() throws IOException(Code)
returns a double from the stream.



readFloat
public float readFloat() throws IOException(Code)
returns a float from the stream.



readFully
public void readFully(byte b) throws IOException(Code)
Reads some bytes from an input stream into the byte array.



readFully
public void readFully(byte b, int off, int len) throws IOException(Code)
Reads the specified number of bytes from an input stream.



readInt
public int readInt() throws IOException(Code)
returns an Int from the stream.



readLine
public String readLine() throws IOException(Code)
returns the next line of text from the input stream.



readLong
public long readLong() throws IOException(Code)
returns a long from the stream.



readShort
public short readShort() throws IOException(Code)
returns a short value from the stream.



readUTF
public String readUTF() throws IOException(Code)
returns a string that has been encoded using in the UTF-8 format.



readUnsignedByte
public int readUnsignedByte() throws IOException(Code)
Reads one input byte in the unsigned form.



readUnsignedShort
public int readUnsignedShort() throws IOException(Code)
returns unsigned short.



seek
public void seek(long newFilePointer) throws IOException(Code)
Set the file pointer.



setLength
public void setLength(long newLength) throws IOException(Code)
Sets the length of this file, either extending or truncating it.



skipBytes
public int skipBytes(int nBytes) throws IOException(Code)
skip over nBytes bytes of data



sync
public void sync(boolean metaData) throws IOException(Code)
Force any changes out to the persistent store.



write
public void write(int b) throws IOException(Code)
Writes an int to the output stream .



write
public void write(byte b) throws IOException(Code)
Writes all the bytes in array to the stream.



write
public void write(byte b, int off, int len) throws IOException(Code)
Writes specified number bytes from array to the stream. If the corruption flags are enabled, byte array is corrupted before doing the real write.



writeBoolean
public void writeBoolean(boolean value) throws IOException(Code)
Writes a boolean value to this output stream.



writeByte
public void writeByte(int value) throws IOException(Code)
Writes to the eight low-order bits of ant int.



writeBytes
public void writeBytes(String str) throws IOException(Code)
Writes a string as bytes to the stream.



writeChar
public void writeChar(int value) throws IOException(Code)
Writes a char value to the output stream.
Parameters:
  value - the char value to be written.
exception:
  IOException - if an I/O error occurs.



writeChars
public void writeChars(String str) throws IOException(Code)
Writes the string to the stream.



writeDouble
public void writeDouble(double value) throws IOException(Code)
Writes a a double value to the stream.



writeFloat
public void writeFloat(float value) throws IOException(Code)
Writes a float value to the output stream.



writeInt
public void writeInt(int value) throws IOException(Code)
Writes an int value to the output stream.



writeLong
public void writeLong(long value) throws IOException(Code)
Writes a long value to the output stream.



writeShort
public void writeShort(int value) throws IOException(Code)
Writes a short value to the output stream



writeUTF
public void writeUTF(String str) throws IOException(Code)
Writes the string in the utf format.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.