Java Doc for ExternalizableUtil.java in  » Net » openfire » org » jivesoftware » util » cache » 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 » Net » openfire » org.jivesoftware.util.cache 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jivesoftware.util.cache.ExternalizableUtil

ExternalizableUtil
public class ExternalizableUtil (Code)
Utility methods to assist in working with the Externalizable interfaces. This class is only used when running inside of a Cluser. When using the open source version this class will use a dummy implementation. Anyway, this class is not used when not using the Enterprise edition.

ExternalizableLite is very similar to the standard Externalizable interface, except that it uses DataOutput/DataInput instead of the Object stream equivalents.
author:
   Gaston Dombiak





Method Summary
public static  ExternalizableUtilgetInstance()
    
public  ExternalizableUtilStrategygetStrategy()
     Returns the implementation to use for serializing and deserializing objects.
public  booleanreadBoolean(DataInput in)
    
public  byte[]readByteArray(DataInput in)
    
public  intreadExternalizableCollection(DataInput in, Collection<? extends Externalizable> value, ClassLoader loader)
     Reads a collection of Externalizable objects and adds them to the collection passed as a parameter.
public  intreadExternalizableMap(DataInput in, Map<String, ? extends Externalizable> map, ClassLoader loader)
     Reads a Map of String key and value pairs.
public  intreadInt(DataInput in)
    
public  longreadLong(DataInput in)
    
public  long[]readLongArray(DataInput in)
     Reads an array of long values.
public  MapreadLongIntMap(DataInput in)
     Reads a Map of Long key and Integer value pairs.
public  StringreadSafeUTF(DataInput in)
    
public  SerializablereadSerializable(DataInput in)
    
public  List<String>readStringList(DataInput in)
     Reads a List of Strings.
public  Map<String, String>readStringMap(DataInput in)
     Reads a Map of String key and value pairs.
public  intreadStrings(DataInput in, Collection<String> collection)
     Reads the string array from the input stream and adds them to the specified collection.
public  intreadStringsMap(DataInput in, Map<String, Set<String>> map)
     Reads a Map of String key and Set of Strings value pairs.
Parameters:
  in - the input stream.
Parameters:
  map - a Map of String key and Set of Strings value pairs.
public  voidsetStrategy(ExternalizableUtilStrategy strategy)
     Sets the implementation to use for serializing and deserializing objects.
public  voidwriteBoolean(DataOutput out, boolean value)
    
public  voidwriteByteArray(DataOutput out, byte[] value)
    
public  voidwriteExternalizableCollection(DataOutput out, Collection<? extends Externalizable> value)
     Writes a collection of Externalizable objects.
public  voidwriteExternalizableMap(DataOutput out, Map<String, ? extends Externalizable> map)
     Writes a Map of String key and value pairs.
public  voidwriteInt(DataOutput out, int value)
    
public  voidwriteLong(DataOutput out, long value)
    
public  voidwriteLongArray(DataOutput out, long[] array)
     Writes an array of long values.
public  voidwriteLongIntMap(DataOutput out, Map<Long, Integer> map)
     Writes a Map of Long key and Integer value pairs.
public  voidwriteSafeUTF(DataOutput out, String value)
    
public  voidwriteSerializable(DataOutput out, Serializable value)
    
public  voidwriteStringList(DataOutput out, List stringList)
     Writes a List of Strings.
public  voidwriteStringMap(DataOutput out, Map<String, String> stringMap)
     Writes a Map of String key and value pairs.
public  voidwriteStrings(DataOutput out, Collection<String> collection)
     Writes content of collection of strings to the output stream.
public  voidwriteStringsMap(DataOutput out, Map<String, Set<String>> map)
     Writes a Map of String key and Set of Strings value pairs.



Method Detail
getInstance
public static ExternalizableUtil getInstance()(Code)



getStrategy
public ExternalizableUtilStrategy getStrategy()(Code)
Returns the implementation to use for serializing and deserializing objects. the implementation to use for serializing and deserializingobjects.



readBoolean
public boolean readBoolean(DataInput in) throws IOException(Code)



readByteArray
public byte[] readByteArray(DataInput in) throws IOException(Code)



readExternalizableCollection
public int readExternalizableCollection(DataInput in, Collection<? extends Externalizable> value, ClassLoader loader) throws IOException(Code)
Reads a collection of Externalizable objects and adds them to the collection passed as a parameter. The collection passed as a parameter must be a collection and not a null value.
Parameters:
  in - the input stream.
Parameters:
  value - the collection of Externalizable objects. This value must not be null.
Parameters:
  loader - class loader to use to build elements inside of the serialized collection.
throws:
  IOException - if an error occurs. the number of elements added to the collection.



readExternalizableMap
public int readExternalizableMap(DataInput in, Map<String, ? extends Externalizable> map, ClassLoader loader) throws IOException(Code)
Reads a Map of String key and value pairs. This method will return null if the Map written to the stream was null.
Parameters:
  in - the input stream.
Parameters:
  map - a Map of String key and Externalizable value pairs.
Parameters:
  loader - class loader to use to build elements inside of the serialized collection.
throws:
  IOException - if an error occurs. the number of elements added to the collection.



readInt
public int readInt(DataInput in) throws IOException(Code)



readLong
public long readLong(DataInput in) throws IOException(Code)



readLongArray
public long[] readLongArray(DataInput in) throws IOException(Code)
Reads an array of long values. This method will return null if the array written to the stream was null.
Parameters:
  in - the input stream. an array of long values.
throws:
  IOException - if an error occurs.



readLongIntMap
public Map readLongIntMap(DataInput in) throws IOException(Code)
Reads a Map of Long key and Integer value pairs. This method will return null if the Map written to the stream was null.
Parameters:
  in - the input stream. a Map of Long key/Integer value pairs.
throws:
  IOException - if an error occurs.



readSafeUTF
public String readSafeUTF(DataInput in) throws IOException(Code)



readSerializable
public Serializable readSerializable(DataInput in) throws IOException(Code)



readStringList
public List<String> readStringList(DataInput in) throws IOException(Code)
Reads a List of Strings. This method will return null if the List written to the stream was null.
Parameters:
  in - the input stream. a List of Strings.
throws:
  IOException - if an error occurs.



readStringMap
public Map<String, String> readStringMap(DataInput in) throws IOException(Code)
Reads a Map of String key and value pairs. This method will return null if the Map written to the stream was null.
Parameters:
  in - the input stream. a Map of String key/value pairs.
throws:
  IOException - if an error occurs.



readStrings
public int readStrings(DataInput in, Collection<String> collection) throws IOException(Code)
Reads the string array from the input stream and adds them to the specified collection.
Parameters:
  in - the input stream.
Parameters:
  collection - the collection to add the read strings from the input stream. number of elements added to the collection.
throws:
  IOException - if an error occurs.



readStringsMap
public int readStringsMap(DataInput in, Map<String, Set<String>> map) throws IOException(Code)
Reads a Map of String key and Set of Strings value pairs.
Parameters:
  in - the input stream.
Parameters:
  map - a Map of String key and Set of Strings value pairs. number of elements added to the collection.
throws:
  IOException - if an error occurs.



setStrategy
public void setStrategy(ExternalizableUtilStrategy strategy)(Code)
Sets the implementation to use for serializing and deserializing objects.
Parameters:
  strategy - the new strategy to use.



writeBoolean
public void writeBoolean(DataOutput out, boolean value) throws IOException(Code)



writeByteArray
public void writeByteArray(DataOutput out, byte[] value) throws IOException(Code)



writeExternalizableCollection
public void writeExternalizableCollection(DataOutput out, Collection<? extends Externalizable> value) throws IOException(Code)
Writes a collection of Externalizable objects. The collection passed as a parameter must be a collection and not a null value.
Parameters:
  out - the output stream.
Parameters:
  value - the collection of Externalizable objects. This value must not be null.
throws:
  IOException - if an error occurs.



writeExternalizableMap
public void writeExternalizableMap(DataOutput out, Map<String, ? extends Externalizable> map) throws IOException(Code)
Writes a Map of String key and value pairs. This method handles the case when the Map is null.
Parameters:
  out - the output stream.
Parameters:
  map - the Map of String key and Externalizable value pairs.
throws:
  java.io.IOException - if an error occurs.



writeInt
public void writeInt(DataOutput out, int value) throws IOException(Code)



writeLong
public void writeLong(DataOutput out, long value) throws IOException(Code)



writeLongArray
public void writeLongArray(DataOutput out, long[] array) throws IOException(Code)
Writes an array of long values. This method handles the case when the array is null.
Parameters:
  out - the output stream.
Parameters:
  array - the array of long values.
throws:
  IOException - if an error occurs.



writeLongIntMap
public void writeLongIntMap(DataOutput out, Map<Long, Integer> map) throws IOException(Code)
Writes a Map of Long key and Integer value pairs. This method handles the case when the Map is null.
Parameters:
  out - the output stream.
Parameters:
  map - the Map of Long key/Integer value pairs.
throws:
  IOException - if an error occurs.



writeSafeUTF
public void writeSafeUTF(DataOutput out, String value) throws IOException(Code)



writeSerializable
public void writeSerializable(DataOutput out, Serializable value) throws IOException(Code)



writeStringList
public void writeStringList(DataOutput out, List stringList) throws IOException(Code)
Writes a List of Strings. This method handles the case when the List is null.
Parameters:
  out - the output stream.
Parameters:
  stringList - the List of Strings.
throws:
  IOException - if an error occurs.



writeStringMap
public void writeStringMap(DataOutput out, Map<String, String> stringMap) throws IOException(Code)
Writes a Map of String key and value pairs. This method handles the case when the Map is null.
Parameters:
  out - the output stream.
Parameters:
  stringMap - the Map of String key/value pairs.
throws:
  java.io.IOException - if an error occurs.



writeStrings
public void writeStrings(DataOutput out, Collection<String> collection) throws IOException(Code)
Writes content of collection of strings to the output stream.
Parameters:
  out - the output stream.
Parameters:
  collection - the Collection of Strings.
throws:
  IOException - if an error occurs.



writeStringsMap
public void writeStringsMap(DataOutput out, Map<String, Set<String>> map) throws IOException(Code)
Writes a Map of String key and Set of Strings value pairs. This method DOES NOT handle the case when the Map is null.
Parameters:
  out - the output stream.
Parameters:
  map - the Map of String key and Set of Strings value pairs.
throws:
  java.io.IOException - if an error occurs.



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.