Java Doc for DataProvider.java in  » Parser » JTopas » de » susebox » jtopas » spi » 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 » Parser » JTopas » de.susebox.jtopas.spi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


de.susebox.jtopas.spi.DataProvider

All known Subclasses:   de.susebox.jtopas.TestMultithreadTokenizerProperties,
DataProvider
public interface DataProvider (Code)

This interface supplies the nessecary methods for a DataMapper or its subinterfaces ( WhitespaceHandler , SeparatorHandler , PatternHandlerKeywordHandler and SequenceHandler ) to perform its operations like checking for whitespaces, special sequences etc. Instances of the interface are created by de.susebox.jtopas.Tokenizer implementations.

A de.susebox.jtopas.Tokenizer implementation will either implement the DataProvider interface itself or has an associated - probably non-public - implementing class.

Note:: Each implementation of this interface should also override the method java.lang.Object.toString . The implementation of toString should return a string composed of all characters of a DataProvider between DataProvider.getStartPosition (including) and DataProvider.getStartPosition + DataProvider.getLength (excluding).

Note:: This interface will eventually be deprecated in favour of the new JDK 1.4 interface java.lang.CharSequence .


See Also:   de.susebox.jtopas.Tokenizer
See Also:   de.susebox.jtopas.TokenizerProperties
See Also:   DataMapper
author:
   Heiko Blau




Method Summary
public  chargetCharAt(int index)
     This method retrieves a single character from the available data.
public  char[]getData()
     This method retrieves the data range the active DataMapper should use for its operations.
public  char[]getDataCopy()
     This method copies the current data range of the de.susebox.jtopas.Tokenizer providing the DataProvider into a character buffer.
public  intgetLength()
     Retrieving the number of characters that a DataProvider can provide.
public  intgetStartPosition()
     Retrieving the position where the data to analyze start in the buffer provided by DataProvider.getData .



Method Detail
getCharAt
public char getCharAt(int index)(Code)
This method retrieves a single character from the available data. Valid values for the parameter index start from 0 and are smaller than DataProvider.getLength .
This method should be used in favour of DataProvider.getData and getDataCopy whereever possible.
Parameters:
  index - an index between 0 and DataProvider.getLength the character at the given position



getData
public char[] getData()(Code)
This method retrieves the data range the active DataMapper should use for its operations. The calling method of the DataMapper should be aware that the provided array is probably the input buffer of the de.susebox.jtopas.Tokenizer . It should therefore treat it as a read-only object.
Use this method in combination with DataProvider.getStartPosition and DataProvider.getLength . Characters outside this range are invalid.
For a more secure but slower access, use the method DataProvider.getDataCopy to retrieve a copy of the valid character range.
An implementation is still free to decide if this method gives access to an internal buffer or copies data into a new buffer. The latter case means that getData is equivalent to DataProvider.getDataCopy . the character buffer to read data fromDataProvider.getCharAt



getDataCopy
public char[] getDataCopy()(Code)
This method copies the current data range of the de.susebox.jtopas.Tokenizer providing the DataProvider into a character buffer. Use this method if data should be modified.
The copy contains only valid data starting at position 0 with the length of the array returned. Don't use DataProvider.getStartPosition or DataProvider.getLength on this copy.
An alternative to this method is java.lang.Object.toString which should therefore be overridden in implementations of this interface. a copy of the valid data of this DataProvider
See Also:   DataProvider.getDataDataProvider.getCharAt



getLength
public int getLength()(Code)
Retrieving the number of characters that a DataProvider can provide. The return value should be a positive integer. number of characters this DataProvider contains.false otherwise



getStartPosition
public int getStartPosition()(Code)
Retrieving the position where the data to analyze start in the buffer provided by DataProvider.getData . The calling DataMapper must not access data prior to this index in the character array. index in the character array returned by DataProvider.getData, where data startsDataProvider.getCharAtDataProvider.getLength



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