Java Doc for AbstractRecordStoreFile.java in  » 6.0-JDK-Modules » j2me » com » sun » midp » rms » 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 » 6.0 JDK Modules » j2me » com.sun.midp.rms 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.midp.rms.AbstractRecordStoreFile

AbstractRecordStoreFile
interface AbstractRecordStoreFile (Code)
A RecordStoreFile is a file abstraction layer between a a RecordStore and an underlying persistent storage mechanism. The underlying storage methods are provided by the RandomAccessStream and File classes. RecordStoreFile confines the namespace of a record store to the scope of the MIDlet suite of its creating application. It also ensures unicode recordstore names are ascii filesystem safe. The RecordStoreImpl class can be implemented directly using the RandomAccessStream and File classes. However, RecordStoreFile served as the java/native code boundary for RMS in the MIDP 1.0 release. It exists now for backwards compatibility with older ports.


Field Summary
final static  intDB_EXTENSION
    
final static  intIDX_EXTENSION
    


Method Summary
 voidclose()
     Disconnect from recordStream if it is non null.
 voidcommitWrite()
    
 intread(byte[] buf)
     Read up to buf.length into buf.
Parameters:
  buf - buffer to read in to.
 intread(byte[] buf, int offset, int numBytes)
     Read up to buf.length into buf starting at offset offset in recordStream and continuing for up to numBytes bytes.
Parameters:
  buf - buffer to read in to.
Parameters:
  offset - starting point read offset, from beginning of buffer.
Parameters:
  numBytes - the number of bytes to read.
 voidseek(int pos)
     Sets the position within recordStream to pos.
 intspaceAvailable(int suiteId)
     Approximation of remaining space in storage.
 voidtruncate(int size)
     Sets the length of this RecordStoreFile size bytes.
 voidwrite(byte[] buf)
     Write all of buf to recordStream.
 voidwrite(byte[] buf, int offset, int numBytes)
     Write buf to recordStream, starting at offset and continuing for numBytes bytes.

Field Detail
DB_EXTENSION
final static int DB_EXTENSION(Code)
extension for RecordStore database files



IDX_EXTENSION
final static int IDX_EXTENSION(Code)
extension for RecordStore database files





Method Detail
close
void close() throws IOException(Code)
Disconnect from recordStream if it is non null. May be called more than once without error.
exception:
  IOException - if an error occurs closingrecordStream.



commitWrite
void commitWrite() throws IOException(Code)
Commit pending writes
exception:
  IOException - if an error occurs while flushingrecordStream.



read
int read(byte[] buf) throws IOException(Code)
Read up to buf.length into buf.
Parameters:
  buf - buffer to read in to. the number of bytes read.
exception:
  IOException - if a read error occurs.



read
int read(byte[] buf, int offset, int numBytes) throws IOException(Code)
Read up to buf.length into buf starting at offset offset in recordStream and continuing for up to numBytes bytes.
Parameters:
  buf - buffer to read in to.
Parameters:
  offset - starting point read offset, from beginning of buffer.
Parameters:
  numBytes - the number of bytes to read. the number of bytes read.
exception:
  IOException - if a read error occurs.



seek
void seek(int pos) throws IOException(Code)
Sets the position within recordStream to pos. This will implicitly grow the underlying stream if pos is made greater than the current length of the storage stream.
Parameters:
  pos - position within the file to move the current_pospointer to.
exception:
  IOException - if there is a problem with the seek.



spaceAvailable
int spaceAvailable(int suiteId)(Code)
Approximation of remaining space in storage. Usage Warning: This may be a slow operation if the platform has to look at the size of each file stored in the MIDP memory space and include its size in the total.
Parameters:
  suiteId - ID of the MIDlet suite that owns the record storecan be null the approximate space available to grow therecord store in bytes.



truncate
void truncate(int size) throws IOException(Code)
Sets the length of this RecordStoreFile size bytes. If this file was previously larger than size the extra data is lost. size must be <= the current length of recordStream
Parameters:
  size - new size for this file.
exception:
  IOException - if an error occurs, or ifsize is less than zero.



write
void write(byte[] buf) throws IOException(Code)
Write all of buf to recordStream.
Parameters:
  buf - buffer to read out of.
exception:
  IOException - if a write error occurs.



write
void write(byte[] buf, int offset, int numBytes) throws IOException(Code)
Write buf to recordStream, starting at offset and continuing for numBytes bytes.
Parameters:
  buf - buffer to read out of.
Parameters:
  offset - starting point write offset, from beginning of buffer.
Parameters:
  numBytes - the number of bytes to write.
exception:
  IOException - if a write error occurs.



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