Moving modules around so the runtime is under one master pom and can be built without building other modules that are in the repository
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 26 Feb 2013 16:54:16 +0100
changeset 772d382dacfd73f
parent 771 4252bfc396fc
child 773 406faa8bc64f
Moving modules around so the runtime is under one master pom and can be built without building other modules that are in the repository
core/pom.xml
core/src/main/java/org/apidesign/bck2brwsr/core/ExtraJavaScript.java
core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptBody.java
core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptOnly.java
core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptPrototype.java
core/src/main/java/org/apidesign/bck2brwsr/core/impl/JavaScriptProcesor.java
emul/compact/pom.xml
emul/compact/src/main/assembly/rt.xml
emul/compact/src/main/java/java/beans/ChangeListenerMap.java
emul/compact/src/main/java/java/beans/IndexedPropertyChangeEvent.java
emul/compact/src/main/java/java/beans/PropertyChangeEvent.java
emul/compact/src/main/java/java/beans/PropertyChangeListener.java
emul/compact/src/main/java/java/beans/PropertyChangeListenerProxy.java
emul/compact/src/main/java/java/beans/PropertyChangeSupport.java
emul/compact/src/main/java/java/beans/PropertyVetoException.java
emul/compact/src/main/java/java/beans/VetoableChangeListener.java
emul/compact/src/main/java/java/beans/VetoableChangeListenerProxy.java
emul/compact/src/main/java/java/beans/VetoableChangeSupport.java
emul/compact/src/main/java/java/io/Bits.java
emul/compact/src/main/java/java/io/BufferedOutputStream.java
emul/compact/src/main/java/java/io/BufferedReader.java
emul/compact/src/main/java/java/io/ByteArrayOutputStream.java
emul/compact/src/main/java/java/io/DataOutput.java
emul/compact/src/main/java/java/io/DataOutputStream.java
emul/compact/src/main/java/java/io/Externalizable.java
emul/compact/src/main/java/java/io/FilterOutputStream.java
emul/compact/src/main/java/java/io/Flushable.java
emul/compact/src/main/java/java/io/InputStreamReader.java
emul/compact/src/main/java/java/io/InvalidClassException.java
emul/compact/src/main/java/java/io/InvalidObjectException.java
emul/compact/src/main/java/java/io/NotActiveException.java
emul/compact/src/main/java/java/io/NotSerializableException.java
emul/compact/src/main/java/java/io/ObjectInput.java
emul/compact/src/main/java/java/io/ObjectInputStream.java
emul/compact/src/main/java/java/io/ObjectInputValidation.java
emul/compact/src/main/java/java/io/ObjectOutput.java
emul/compact/src/main/java/java/io/ObjectOutputStream.java
emul/compact/src/main/java/java/io/ObjectStreamClass.java
emul/compact/src/main/java/java/io/ObjectStreamConstants.java
emul/compact/src/main/java/java/io/ObjectStreamException.java
emul/compact/src/main/java/java/io/ObjectStreamField.java
emul/compact/src/main/java/java/io/OptionalDataException.java
emul/compact/src/main/java/java/io/OutputStream.java
emul/compact/src/main/java/java/io/Reader.java
emul/compact/src/main/java/java/io/StreamCorruptedException.java
emul/compact/src/main/java/java/io/WriteAbortedException.java
emul/compact/src/main/java/java/lang/AbstractMethodError.java
emul/compact/src/main/java/java/lang/Cloneable.java
emul/compact/src/main/java/java/lang/IncompatibleClassChangeError.java
emul/compact/src/main/java/java/lang/InternalError.java
emul/compact/src/main/java/java/lang/Iterable.java
emul/compact/src/main/java/java/lang/NoSuchFieldError.java
emul/compact/src/main/java/java/lang/Readable.java
emul/compact/src/main/java/java/lang/SafeVarargs.java
emul/compact/src/main/java/java/lang/SuppressWarnings.java
emul/compact/src/main/java/java/lang/System.java
emul/compact/src/main/java/java/lang/ref/PhantomReference.java
emul/compact/src/main/java/java/lang/ref/Reference.java
emul/compact/src/main/java/java/lang/ref/ReferenceQueue.java
emul/compact/src/main/java/java/lang/ref/SoftReference.java
emul/compact/src/main/java/java/lang/ref/WeakReference.java
emul/compact/src/main/java/java/lang/ref/package.html
emul/compact/src/main/java/java/util/AbstractCollection.java
emul/compact/src/main/java/java/util/AbstractList.java
emul/compact/src/main/java/java/util/AbstractMap.java
emul/compact/src/main/java/java/util/AbstractQueue.java
emul/compact/src/main/java/java/util/AbstractSequentialList.java
emul/compact/src/main/java/java/util/AbstractSet.java
emul/compact/src/main/java/java/util/ArrayDeque.java
emul/compact/src/main/java/java/util/ArrayList.java
emul/compact/src/main/java/java/util/Arrays.java
emul/compact/src/main/java/java/util/Collection.java
emul/compact/src/main/java/java/util/Collections.java
emul/compact/src/main/java/java/util/ComparableTimSort.java
emul/compact/src/main/java/java/util/ConcurrentModificationException.java
emul/compact/src/main/java/java/util/Deque.java
emul/compact/src/main/java/java/util/Dictionary.java
emul/compact/src/main/java/java/util/DualPivotQuicksort.java
emul/compact/src/main/java/java/util/EmptyStackException.java
emul/compact/src/main/java/java/util/EventListener.java
emul/compact/src/main/java/java/util/EventListenerProxy.java
emul/compact/src/main/java/java/util/EventObject.java
emul/compact/src/main/java/java/util/HashMap.java
emul/compact/src/main/java/java/util/HashSet.java
emul/compact/src/main/java/java/util/Hashtable.java
emul/compact/src/main/java/java/util/Iterator.java
emul/compact/src/main/java/java/util/LinkedHashMap.java
emul/compact/src/main/java/java/util/LinkedList.java
emul/compact/src/main/java/java/util/List.java
emul/compact/src/main/java/java/util/ListIterator.java
emul/compact/src/main/java/java/util/Map.java
emul/compact/src/main/java/java/util/Objects.java
emul/compact/src/main/java/java/util/PriorityQueue.java
emul/compact/src/main/java/java/util/Queue.java
emul/compact/src/main/java/java/util/Random.java
emul/compact/src/main/java/java/util/RandomAccess.java
emul/compact/src/main/java/java/util/ServiceConfigurationError.java
emul/compact/src/main/java/java/util/ServiceLoader.java
emul/compact/src/main/java/java/util/Set.java
emul/compact/src/main/java/java/util/SortedMap.java
emul/compact/src/main/java/java/util/SortedSet.java
emul/compact/src/main/java/java/util/Stack.java
emul/compact/src/main/java/java/util/StringTokenizer.java
emul/compact/src/main/java/java/util/TimSort.java
emul/compact/src/main/java/java/util/Vector.java
emul/compact/src/main/java/java/util/concurrent/Callable.java
emul/compact/src/main/java/java/util/concurrent/TimeUnit.java
emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/CollectionsTest.java
emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/JFXIssuesTest.java
emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/RandomTest.java
emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/ReaderTest.java
emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/ServiceLoaderTest.java
emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/ZipArchive.java
emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/ZipCompatibilityTest.java
emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/ZipVsJzLibTest.java
emul/compact/src/test/resources/org/apidesign/bck2brwsr/compact/tck/demo.static.calculator-0.3-SNAPSHOT.jar
emul/mini/pom.xml
emul/mini/src/main/java/java/io/ByteArrayInputStream.java
emul/mini/src/main/java/java/io/Closeable.java
emul/mini/src/main/java/java/io/DataInput.java
emul/mini/src/main/java/java/io/DataInputStream.java
emul/mini/src/main/java/java/io/EOFException.java
emul/mini/src/main/java/java/io/FilterInputStream.java
emul/mini/src/main/java/java/io/IOException.java
emul/mini/src/main/java/java/io/InputStream.java
emul/mini/src/main/java/java/io/PushbackInputStream.java
emul/mini/src/main/java/java/io/Serializable.java
emul/mini/src/main/java/java/io/UTFDataFormatException.java
emul/mini/src/main/java/java/io/UnsupportedEncodingException.java
emul/mini/src/main/java/java/lang/AbstractStringBuilder.java
emul/mini/src/main/java/java/lang/Appendable.java
emul/mini/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java
emul/mini/src/main/java/java/lang/ArrayStoreException.java
emul/mini/src/main/java/java/lang/AssertionError.java
emul/mini/src/main/java/java/lang/AutoCloseable.java
emul/mini/src/main/java/java/lang/Boolean.java
emul/mini/src/main/java/java/lang/Byte.java
emul/mini/src/main/java/java/lang/CharSequence.java
emul/mini/src/main/java/java/lang/Character.java
emul/mini/src/main/java/java/lang/Class.java
emul/mini/src/main/java/java/lang/ClassCastException.java
emul/mini/src/main/java/java/lang/ClassFormatError.java
emul/mini/src/main/java/java/lang/ClassLoader.java
emul/mini/src/main/java/java/lang/ClassNotFoundException.java
emul/mini/src/main/java/java/lang/CloneNotSupportedException.java
emul/mini/src/main/java/java/lang/Cloneable.java
emul/mini/src/main/java/java/lang/Comparable.java
emul/mini/src/main/java/java/lang/Deprecated.java
emul/mini/src/main/java/java/lang/Double.java
emul/mini/src/main/java/java/lang/Enum.java
emul/mini/src/main/java/java/lang/Error.java
emul/mini/src/main/java/java/lang/Exception.java
emul/mini/src/main/java/java/lang/Float.java
emul/mini/src/main/java/java/lang/IllegalAccessError.java
emul/mini/src/main/java/java/lang/IllegalAccessException.java
emul/mini/src/main/java/java/lang/IllegalArgumentException.java
emul/mini/src/main/java/java/lang/IllegalStateException.java
emul/mini/src/main/java/java/lang/IncompatibleClassChangeError.java
emul/mini/src/main/java/java/lang/IndexOutOfBoundsException.java
emul/mini/src/main/java/java/lang/InstantiationException.java
emul/mini/src/main/java/java/lang/Integer.java
emul/mini/src/main/java/java/lang/InterruptedException.java
emul/mini/src/main/java/java/lang/LinkageError.java
emul/mini/src/main/java/java/lang/Long.java
emul/mini/src/main/java/java/lang/Math.java
emul/mini/src/main/java/java/lang/NegativeArraySizeException.java
emul/mini/src/main/java/java/lang/NoSuchMethodException.java
emul/mini/src/main/java/java/lang/NullPointerException.java
emul/mini/src/main/java/java/lang/Number.java
emul/mini/src/main/java/java/lang/NumberFormatException.java
emul/mini/src/main/java/java/lang/Object.java
emul/mini/src/main/java/java/lang/OutOfMemoryError.java
emul/mini/src/main/java/java/lang/Override.java
emul/mini/src/main/java/java/lang/ReflectiveOperationException.java
emul/mini/src/main/java/java/lang/Runnable.java
emul/mini/src/main/java/java/lang/RuntimeException.java
emul/mini/src/main/java/java/lang/SecurityException.java
emul/mini/src/main/java/java/lang/Short.java
emul/mini/src/main/java/java/lang/StackTraceElement.java
emul/mini/src/main/java/java/lang/String.java
emul/mini/src/main/java/java/lang/StringBuffer.java
emul/mini/src/main/java/java/lang/StringBuilder.java
emul/mini/src/main/java/java/lang/StringIndexOutOfBoundsException.java
emul/mini/src/main/java/java/lang/Throwable.java
emul/mini/src/main/java/java/lang/VirtualMachineError.java
emul/mini/src/main/java/java/lang/Void.java
emul/mini/src/main/java/java/lang/annotation/Annotation.java
emul/mini/src/main/java/java/lang/annotation/Documented.java
emul/mini/src/main/java/java/lang/annotation/ElementType.java
emul/mini/src/main/java/java/lang/annotation/Retention.java
emul/mini/src/main/java/java/lang/annotation/RetentionPolicy.java
emul/mini/src/main/java/java/lang/annotation/Target.java
emul/mini/src/main/java/java/lang/annotation/UnsupportedOperationException.java
emul/mini/src/main/java/java/lang/reflect/AccessibleObject.java
emul/mini/src/main/java/java/lang/reflect/AnnotatedElement.java
emul/mini/src/main/java/java/lang/reflect/Array.java
emul/mini/src/main/java/java/lang/reflect/Constructor.java
emul/mini/src/main/java/java/lang/reflect/Field.java
emul/mini/src/main/java/java/lang/reflect/GenericDeclaration.java
emul/mini/src/main/java/java/lang/reflect/InvocationHandler.java
emul/mini/src/main/java/java/lang/reflect/InvocationTargetException.java
emul/mini/src/main/java/java/lang/reflect/Member.java
emul/mini/src/main/java/java/lang/reflect/Method.java
emul/mini/src/main/java/java/lang/reflect/Modifier.java
emul/mini/src/main/java/java/lang/reflect/Proxy.java
emul/mini/src/main/java/java/lang/reflect/Type.java
emul/mini/src/main/java/java/lang/reflect/TypeVariable.java
emul/mini/src/main/java/java/lang/reflect/UndeclaredThrowableException.java
emul/mini/src/main/java/java/lang/reflect/package-info.java
emul/mini/src/main/java/java/net/MalformedURLException.java
emul/mini/src/main/java/java/net/URL.java
emul/mini/src/main/java/java/net/URLStreamHandler.java
emul/mini/src/main/java/java/util/Comparator.java
emul/mini/src/main/java/java/util/Enumeration.java
emul/mini/src/main/java/java/util/NoSuchElementException.java
emul/mini/src/main/java/java/util/zip/Adler32.java
emul/mini/src/main/java/java/util/zip/CRC32.java
emul/mini/src/main/java/java/util/zip/Checksum.java
emul/mini/src/main/java/java/util/zip/DataFormatException.java
emul/mini/src/main/java/java/util/zip/Inflater.java
emul/mini/src/main/java/java/util/zip/InflaterInputStream.java
emul/mini/src/main/java/java/util/zip/ZStreamRef.java
emul/mini/src/main/java/java/util/zip/ZipConstants.java
emul/mini/src/main/java/java/util/zip/ZipEntry.java
emul/mini/src/main/java/java/util/zip/ZipException.java
emul/mini/src/main/java/java/util/zip/ZipInputStream.java
emul/mini/src/main/java/java/util/zip/package.html
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/lang/ManifestInputStream.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/lang/System.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/reflect/AnnotationImpl.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/reflect/MethodImpl.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/reflect/TypeProvider.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/Adler32.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/CRC32.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/Checksum.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/FastJar.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/GZIPHeader.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/InfBlocks.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/InfCodes.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/InfTree.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/Inflate.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/Inflater.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/JzLibInflater.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/ZStream.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/ZipConstants64.java
emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/ZipInputStream.java
emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js
emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_String.js
emul/mini/src/test/java/org/apidesign/bck2brwsr/emul/reflect/MethodImplTest.java
emul/pom.xml
javap/pom.xml
javap/src/main/java/org/apidesign/javap/AnnotationParser.java
javap/src/main/java/org/apidesign/javap/AttrData.java
javap/src/main/java/org/apidesign/javap/CPX.java
javap/src/main/java/org/apidesign/javap/CPX2.java
javap/src/main/java/org/apidesign/javap/ClassData.java
javap/src/main/java/org/apidesign/javap/Constants.java
javap/src/main/java/org/apidesign/javap/FieldData.java
javap/src/main/java/org/apidesign/javap/Hashtable.java
javap/src/main/java/org/apidesign/javap/InnerClassData.java
javap/src/main/java/org/apidesign/javap/LineNumData.java
javap/src/main/java/org/apidesign/javap/LocVarData.java
javap/src/main/java/org/apidesign/javap/MethodData.java
javap/src/main/java/org/apidesign/javap/RuntimeConstants.java
javap/src/main/java/org/apidesign/javap/StackMapData.java
javap/src/main/java/org/apidesign/javap/StackMapIterator.java
javap/src/main/java/org/apidesign/javap/StackMapTableData.java
javap/src/main/java/org/apidesign/javap/TrapData.java
javap/src/main/java/org/apidesign/javap/TrapDataIterator.java
javap/src/main/java/org/apidesign/javap/TypeArray.java
javap/src/main/java/org/apidesign/javap/Vector.java
launcher/pom.xml
launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java
launcher/src/main/java/org/apidesign/bck2brwsr/launcher/InvocationContext.java
launcher/src/main/java/org/apidesign/bck2brwsr/launcher/JSLauncher.java
launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Launcher.java
launcher/src/main/java/org/apidesign/bck2brwsr/launcher/impl/Console.java
launcher/src/main/resources/org/apidesign/bck2brwsr/launcher/harness.xhtml
mojo/pom.xml
mojo/src/main/java/org/apidesign/bck2brwsr/mojo/BrswrMojo.java
mojo/src/main/java/org/apidesign/bck2brwsr/mojo/Java2JavaScript.java
mojo/src/main/resources/META-INF/maven/archetype-metadata.xml
mojo/src/main/resources/archetype-resources/bck2brwsr-assembly.xml
mojo/src/main/resources/archetype-resources/nbactions.xml
mojo/src/main/resources/archetype-resources/pom.xml
mojo/src/main/resources/archetype-resources/src/main/java/App.java
mojo/src/main/resources/archetype-resources/src/main/resources/index.html
mojo/src/main/resources/archetype-resources/src/test/java/AppTest.java
mojo/src/main/resources/archetype-resources/src/test/java/InconsistencyTest.java
mojo/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java
pom.xml
rt/core/pom.xml
rt/core/src/main/java/org/apidesign/bck2brwsr/core/ExtraJavaScript.java
rt/core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptBody.java
rt/core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptOnly.java
rt/core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptPrototype.java
rt/core/src/main/java/org/apidesign/bck2brwsr/core/impl/JavaScriptProcesor.java
rt/emul/compact/pom.xml
rt/emul/compact/src/main/assembly/rt.xml
rt/emul/compact/src/main/java/java/beans/ChangeListenerMap.java
rt/emul/compact/src/main/java/java/beans/IndexedPropertyChangeEvent.java
rt/emul/compact/src/main/java/java/beans/PropertyChangeEvent.java
rt/emul/compact/src/main/java/java/beans/PropertyChangeListener.java
rt/emul/compact/src/main/java/java/beans/PropertyChangeListenerProxy.java
rt/emul/compact/src/main/java/java/beans/PropertyChangeSupport.java
rt/emul/compact/src/main/java/java/beans/PropertyVetoException.java
rt/emul/compact/src/main/java/java/beans/VetoableChangeListener.java
rt/emul/compact/src/main/java/java/beans/VetoableChangeListenerProxy.java
rt/emul/compact/src/main/java/java/beans/VetoableChangeSupport.java
rt/emul/compact/src/main/java/java/io/Bits.java
rt/emul/compact/src/main/java/java/io/BufferedOutputStream.java
rt/emul/compact/src/main/java/java/io/BufferedReader.java
rt/emul/compact/src/main/java/java/io/ByteArrayOutputStream.java
rt/emul/compact/src/main/java/java/io/DataOutput.java
rt/emul/compact/src/main/java/java/io/DataOutputStream.java
rt/emul/compact/src/main/java/java/io/Externalizable.java
rt/emul/compact/src/main/java/java/io/FilterOutputStream.java
rt/emul/compact/src/main/java/java/io/Flushable.java
rt/emul/compact/src/main/java/java/io/InputStreamReader.java
rt/emul/compact/src/main/java/java/io/InvalidClassException.java
rt/emul/compact/src/main/java/java/io/InvalidObjectException.java
rt/emul/compact/src/main/java/java/io/NotActiveException.java
rt/emul/compact/src/main/java/java/io/NotSerializableException.java
rt/emul/compact/src/main/java/java/io/ObjectInput.java
rt/emul/compact/src/main/java/java/io/ObjectInputStream.java
rt/emul/compact/src/main/java/java/io/ObjectInputValidation.java
rt/emul/compact/src/main/java/java/io/ObjectOutput.java
rt/emul/compact/src/main/java/java/io/ObjectOutputStream.java
rt/emul/compact/src/main/java/java/io/ObjectStreamClass.java
rt/emul/compact/src/main/java/java/io/ObjectStreamConstants.java
rt/emul/compact/src/main/java/java/io/ObjectStreamException.java
rt/emul/compact/src/main/java/java/io/ObjectStreamField.java
rt/emul/compact/src/main/java/java/io/OptionalDataException.java
rt/emul/compact/src/main/java/java/io/OutputStream.java
rt/emul/compact/src/main/java/java/io/Reader.java
rt/emul/compact/src/main/java/java/io/StreamCorruptedException.java
rt/emul/compact/src/main/java/java/io/WriteAbortedException.java
rt/emul/compact/src/main/java/java/lang/AbstractMethodError.java
rt/emul/compact/src/main/java/java/lang/Cloneable.java
rt/emul/compact/src/main/java/java/lang/IncompatibleClassChangeError.java
rt/emul/compact/src/main/java/java/lang/InternalError.java
rt/emul/compact/src/main/java/java/lang/Iterable.java
rt/emul/compact/src/main/java/java/lang/NoSuchFieldError.java
rt/emul/compact/src/main/java/java/lang/Readable.java
rt/emul/compact/src/main/java/java/lang/SafeVarargs.java
rt/emul/compact/src/main/java/java/lang/SuppressWarnings.java
rt/emul/compact/src/main/java/java/lang/System.java
rt/emul/compact/src/main/java/java/lang/ref/PhantomReference.java
rt/emul/compact/src/main/java/java/lang/ref/Reference.java
rt/emul/compact/src/main/java/java/lang/ref/ReferenceQueue.java
rt/emul/compact/src/main/java/java/lang/ref/SoftReference.java
rt/emul/compact/src/main/java/java/lang/ref/WeakReference.java
rt/emul/compact/src/main/java/java/lang/ref/package.html
rt/emul/compact/src/main/java/java/util/AbstractCollection.java
rt/emul/compact/src/main/java/java/util/AbstractList.java
rt/emul/compact/src/main/java/java/util/AbstractMap.java
rt/emul/compact/src/main/java/java/util/AbstractQueue.java
rt/emul/compact/src/main/java/java/util/AbstractSequentialList.java
rt/emul/compact/src/main/java/java/util/AbstractSet.java
rt/emul/compact/src/main/java/java/util/ArrayDeque.java
rt/emul/compact/src/main/java/java/util/ArrayList.java
rt/emul/compact/src/main/java/java/util/Arrays.java
rt/emul/compact/src/main/java/java/util/Collection.java
rt/emul/compact/src/main/java/java/util/Collections.java
rt/emul/compact/src/main/java/java/util/ComparableTimSort.java
rt/emul/compact/src/main/java/java/util/ConcurrentModificationException.java
rt/emul/compact/src/main/java/java/util/Deque.java
rt/emul/compact/src/main/java/java/util/Dictionary.java
rt/emul/compact/src/main/java/java/util/DualPivotQuicksort.java
rt/emul/compact/src/main/java/java/util/EmptyStackException.java
rt/emul/compact/src/main/java/java/util/EventListener.java
rt/emul/compact/src/main/java/java/util/EventListenerProxy.java
rt/emul/compact/src/main/java/java/util/EventObject.java
rt/emul/compact/src/main/java/java/util/HashMap.java
rt/emul/compact/src/main/java/java/util/HashSet.java
rt/emul/compact/src/main/java/java/util/Hashtable.java
rt/emul/compact/src/main/java/java/util/Iterator.java
rt/emul/compact/src/main/java/java/util/LinkedHashMap.java
rt/emul/compact/src/main/java/java/util/LinkedList.java
rt/emul/compact/src/main/java/java/util/List.java
rt/emul/compact/src/main/java/java/util/ListIterator.java
rt/emul/compact/src/main/java/java/util/Map.java
rt/emul/compact/src/main/java/java/util/Objects.java
rt/emul/compact/src/main/java/java/util/PriorityQueue.java
rt/emul/compact/src/main/java/java/util/Queue.java
rt/emul/compact/src/main/java/java/util/Random.java
rt/emul/compact/src/main/java/java/util/RandomAccess.java
rt/emul/compact/src/main/java/java/util/ServiceConfigurationError.java
rt/emul/compact/src/main/java/java/util/ServiceLoader.java
rt/emul/compact/src/main/java/java/util/Set.java
rt/emul/compact/src/main/java/java/util/SortedMap.java
rt/emul/compact/src/main/java/java/util/SortedSet.java
rt/emul/compact/src/main/java/java/util/Stack.java
rt/emul/compact/src/main/java/java/util/StringTokenizer.java
rt/emul/compact/src/main/java/java/util/TimSort.java
rt/emul/compact/src/main/java/java/util/Vector.java
rt/emul/compact/src/main/java/java/util/concurrent/Callable.java
rt/emul/compact/src/main/java/java/util/concurrent/TimeUnit.java
rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/CollectionsTest.java
rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/JFXIssuesTest.java
rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/RandomTest.java
rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/ReaderTest.java
rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/ServiceLoaderTest.java
rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/ZipArchive.java
rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/ZipCompatibilityTest.java
rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/compact/tck/ZipVsJzLibTest.java
rt/emul/compact/src/test/resources/org/apidesign/bck2brwsr/compact/tck/demo.static.calculator-0.3-SNAPSHOT.jar
rt/emul/mini/pom.xml
rt/emul/mini/src/main/java/java/io/ByteArrayInputStream.java
rt/emul/mini/src/main/java/java/io/Closeable.java
rt/emul/mini/src/main/java/java/io/DataInput.java
rt/emul/mini/src/main/java/java/io/DataInputStream.java
rt/emul/mini/src/main/java/java/io/EOFException.java
rt/emul/mini/src/main/java/java/io/FilterInputStream.java
rt/emul/mini/src/main/java/java/io/IOException.java
rt/emul/mini/src/main/java/java/io/InputStream.java
rt/emul/mini/src/main/java/java/io/PushbackInputStream.java
rt/emul/mini/src/main/java/java/io/Serializable.java
rt/emul/mini/src/main/java/java/io/UTFDataFormatException.java
rt/emul/mini/src/main/java/java/io/UnsupportedEncodingException.java
rt/emul/mini/src/main/java/java/lang/AbstractStringBuilder.java
rt/emul/mini/src/main/java/java/lang/Appendable.java
rt/emul/mini/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java
rt/emul/mini/src/main/java/java/lang/ArrayStoreException.java
rt/emul/mini/src/main/java/java/lang/AssertionError.java
rt/emul/mini/src/main/java/java/lang/AutoCloseable.java
rt/emul/mini/src/main/java/java/lang/Boolean.java
rt/emul/mini/src/main/java/java/lang/Byte.java
rt/emul/mini/src/main/java/java/lang/CharSequence.java
rt/emul/mini/src/main/java/java/lang/Character.java
rt/emul/mini/src/main/java/java/lang/Class.java
rt/emul/mini/src/main/java/java/lang/ClassCastException.java
rt/emul/mini/src/main/java/java/lang/ClassFormatError.java
rt/emul/mini/src/main/java/java/lang/ClassLoader.java
rt/emul/mini/src/main/java/java/lang/ClassNotFoundException.java
rt/emul/mini/src/main/java/java/lang/CloneNotSupportedException.java
rt/emul/mini/src/main/java/java/lang/Cloneable.java
rt/emul/mini/src/main/java/java/lang/Comparable.java
rt/emul/mini/src/main/java/java/lang/Deprecated.java
rt/emul/mini/src/main/java/java/lang/Double.java
rt/emul/mini/src/main/java/java/lang/Enum.java
rt/emul/mini/src/main/java/java/lang/Error.java
rt/emul/mini/src/main/java/java/lang/Exception.java
rt/emul/mini/src/main/java/java/lang/Float.java
rt/emul/mini/src/main/java/java/lang/IllegalAccessError.java
rt/emul/mini/src/main/java/java/lang/IllegalAccessException.java
rt/emul/mini/src/main/java/java/lang/IllegalArgumentException.java
rt/emul/mini/src/main/java/java/lang/IllegalStateException.java
rt/emul/mini/src/main/java/java/lang/IncompatibleClassChangeError.java
rt/emul/mini/src/main/java/java/lang/IndexOutOfBoundsException.java
rt/emul/mini/src/main/java/java/lang/InstantiationException.java
rt/emul/mini/src/main/java/java/lang/Integer.java
rt/emul/mini/src/main/java/java/lang/InterruptedException.java
rt/emul/mini/src/main/java/java/lang/LinkageError.java
rt/emul/mini/src/main/java/java/lang/Long.java
rt/emul/mini/src/main/java/java/lang/Math.java
rt/emul/mini/src/main/java/java/lang/NegativeArraySizeException.java
rt/emul/mini/src/main/java/java/lang/NoSuchMethodException.java
rt/emul/mini/src/main/java/java/lang/NullPointerException.java
rt/emul/mini/src/main/java/java/lang/Number.java
rt/emul/mini/src/main/java/java/lang/NumberFormatException.java
rt/emul/mini/src/main/java/java/lang/Object.java
rt/emul/mini/src/main/java/java/lang/OutOfMemoryError.java
rt/emul/mini/src/main/java/java/lang/Override.java
rt/emul/mini/src/main/java/java/lang/ReflectiveOperationException.java
rt/emul/mini/src/main/java/java/lang/Runnable.java
rt/emul/mini/src/main/java/java/lang/RuntimeException.java
rt/emul/mini/src/main/java/java/lang/SecurityException.java
rt/emul/mini/src/main/java/java/lang/Short.java
rt/emul/mini/src/main/java/java/lang/StackTraceElement.java
rt/emul/mini/src/main/java/java/lang/String.java
rt/emul/mini/src/main/java/java/lang/StringBuffer.java
rt/emul/mini/src/main/java/java/lang/StringBuilder.java
rt/emul/mini/src/main/java/java/lang/StringIndexOutOfBoundsException.java
rt/emul/mini/src/main/java/java/lang/Throwable.java
rt/emul/mini/src/main/java/java/lang/VirtualMachineError.java
rt/emul/mini/src/main/java/java/lang/Void.java
rt/emul/mini/src/main/java/java/lang/annotation/Annotation.java
rt/emul/mini/src/main/java/java/lang/annotation/Documented.java
rt/emul/mini/src/main/java/java/lang/annotation/ElementType.java
rt/emul/mini/src/main/java/java/lang/annotation/Retention.java
rt/emul/mini/src/main/java/java/lang/annotation/RetentionPolicy.java
rt/emul/mini/src/main/java/java/lang/annotation/Target.java
rt/emul/mini/src/main/java/java/lang/annotation/UnsupportedOperationException.java
rt/emul/mini/src/main/java/java/lang/reflect/AccessibleObject.java
rt/emul/mini/src/main/java/java/lang/reflect/AnnotatedElement.java
rt/emul/mini/src/main/java/java/lang/reflect/Array.java
rt/emul/mini/src/main/java/java/lang/reflect/Constructor.java
rt/emul/mini/src/main/java/java/lang/reflect/Field.java
rt/emul/mini/src/main/java/java/lang/reflect/GenericDeclaration.java
rt/emul/mini/src/main/java/java/lang/reflect/InvocationHandler.java
rt/emul/mini/src/main/java/java/lang/reflect/InvocationTargetException.java
rt/emul/mini/src/main/java/java/lang/reflect/Member.java
rt/emul/mini/src/main/java/java/lang/reflect/Method.java
rt/emul/mini/src/main/java/java/lang/reflect/Modifier.java
rt/emul/mini/src/main/java/java/lang/reflect/Proxy.java
rt/emul/mini/src/main/java/java/lang/reflect/Type.java
rt/emul/mini/src/main/java/java/lang/reflect/TypeVariable.java
rt/emul/mini/src/main/java/java/lang/reflect/UndeclaredThrowableException.java
rt/emul/mini/src/main/java/java/lang/reflect/package-info.java
rt/emul/mini/src/main/java/java/net/MalformedURLException.java
rt/emul/mini/src/main/java/java/net/URL.java
rt/emul/mini/src/main/java/java/net/URLStreamHandler.java
rt/emul/mini/src/main/java/java/util/Comparator.java
rt/emul/mini/src/main/java/java/util/Enumeration.java
rt/emul/mini/src/main/java/java/util/NoSuchElementException.java
rt/emul/mini/src/main/java/java/util/zip/Adler32.java
rt/emul/mini/src/main/java/java/util/zip/CRC32.java
rt/emul/mini/src/main/java/java/util/zip/Checksum.java
rt/emul/mini/src/main/java/java/util/zip/DataFormatException.java
rt/emul/mini/src/main/java/java/util/zip/Inflater.java
rt/emul/mini/src/main/java/java/util/zip/InflaterInputStream.java
rt/emul/mini/src/main/java/java/util/zip/ZStreamRef.java
rt/emul/mini/src/main/java/java/util/zip/ZipConstants.java
rt/emul/mini/src/main/java/java/util/zip/ZipEntry.java
rt/emul/mini/src/main/java/java/util/zip/ZipException.java
rt/emul/mini/src/main/java/java/util/zip/ZipInputStream.java
rt/emul/mini/src/main/java/java/util/zip/package.html
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/lang/ManifestInputStream.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/lang/System.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/reflect/AnnotationImpl.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/reflect/MethodImpl.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/reflect/TypeProvider.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/Adler32.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/CRC32.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/Checksum.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/FastJar.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/GZIPHeader.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/InfBlocks.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/InfCodes.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/InfTree.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/Inflate.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/Inflater.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/JzLibInflater.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/ZStream.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/ZipConstants64.java
rt/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/ZipInputStream.java
rt/emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js
rt/emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_String.js
rt/emul/mini/src/test/java/org/apidesign/bck2brwsr/emul/reflect/MethodImplTest.java
rt/emul/pom.xml
rt/javap/pom.xml
rt/javap/src/main/java/org/apidesign/javap/AnnotationParser.java
rt/javap/src/main/java/org/apidesign/javap/AttrData.java
rt/javap/src/main/java/org/apidesign/javap/CPX.java
rt/javap/src/main/java/org/apidesign/javap/CPX2.java
rt/javap/src/main/java/org/apidesign/javap/ClassData.java
rt/javap/src/main/java/org/apidesign/javap/Constants.java
rt/javap/src/main/java/org/apidesign/javap/FieldData.java
rt/javap/src/main/java/org/apidesign/javap/Hashtable.java
rt/javap/src/main/java/org/apidesign/javap/InnerClassData.java
rt/javap/src/main/java/org/apidesign/javap/LineNumData.java
rt/javap/src/main/java/org/apidesign/javap/LocVarData.java
rt/javap/src/main/java/org/apidesign/javap/MethodData.java
rt/javap/src/main/java/org/apidesign/javap/RuntimeConstants.java
rt/javap/src/main/java/org/apidesign/javap/StackMapData.java
rt/javap/src/main/java/org/apidesign/javap/StackMapIterator.java
rt/javap/src/main/java/org/apidesign/javap/StackMapTableData.java
rt/javap/src/main/java/org/apidesign/javap/TrapData.java
rt/javap/src/main/java/org/apidesign/javap/TrapDataIterator.java
rt/javap/src/main/java/org/apidesign/javap/TypeArray.java
rt/javap/src/main/java/org/apidesign/javap/Vector.java
rt/launcher/pom.xml
rt/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java
rt/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/InvocationContext.java
rt/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/JSLauncher.java
rt/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Launcher.java
rt/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/impl/Console.java
rt/launcher/src/main/resources/org/apidesign/bck2brwsr/launcher/harness.xhtml
rt/mojo/pom.xml
rt/mojo/src/main/java/org/apidesign/bck2brwsr/mojo/BrswrMojo.java
rt/mojo/src/main/java/org/apidesign/bck2brwsr/mojo/Java2JavaScript.java
rt/mojo/src/main/resources/META-INF/maven/archetype-metadata.xml
rt/mojo/src/main/resources/archetype-resources/bck2brwsr-assembly.xml
rt/mojo/src/main/resources/archetype-resources/nbactions.xml
rt/mojo/src/main/resources/archetype-resources/pom.xml
rt/mojo/src/main/resources/archetype-resources/src/main/java/App.java
rt/mojo/src/main/resources/archetype-resources/src/main/resources/index.html
rt/mojo/src/main/resources/archetype-resources/src/test/java/AppTest.java
rt/mojo/src/main/resources/archetype-resources/src/test/java/InconsistencyTest.java
rt/mojo/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java
rt/vm/pom.xml
rt/vm/src/main/assembly/bck2brwsr.xml
rt/vm/src/main/java/org/apidesign/vm4brwsr/Bck2Brwsr.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/LocalsMapper.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/Main.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/ParseMan.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/StackMapper.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/StringArray.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/VM.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/VMLazy.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/VarType.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/Variable.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/Zips.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/Array.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/ArrayTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/ByteCodeToJavaScriptTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/BytesLoader.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/ClassTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/Classes.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/ClassesMarker.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/ClassesNamer.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/Exceptions.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/ExceptionsTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/GetByte.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/Instance.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/InstanceSub.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/InstanceSubTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/InstanceTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/Script.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/StaticMethod.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/StaticMethodTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/StaticUse.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/StringArrayTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/StringSample.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/StringTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/SystemTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/TestVM.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/VMLazyTest.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/VMinVM.java
rt/vm/src/test/java/org/apidesign/vm4brwsr/VMinVMTest.java
rt/vm/src/test/resources/org/apidesign/vm4brwsr/ko.js
rt/vmtest/pom.xml
rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/BrwsrTest.java
rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Compare.java
rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/HtmlFragment.java
rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Http.java
rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/VMTest.java
rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/Bck2BrwsrCase.java
rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/CompareCase.java
rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/GenerateZip.java
rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/GenerateZipProcessor.java
rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/LaunchSetup.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/AssertionTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/BrwsrCheckTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ByteArithmeticTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/CloneTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/CompareByteArrayTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/CompareHashTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/CompareIntArrayTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/CompareStringsTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/HttpResourceTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/InheritanceA.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/InheritanceB.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/InheritanceTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/IntegerArithmeticTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/LongArithmeticTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ReflectionArrayTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ReflectionTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ResourcesTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ShortArithmeticTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/StaticUse.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/vmtest/impl/CRC32Test.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/vmtest/impl/ZipEntryTest.java
rt/vmtest/src/test/java/org/apidesign/bck2brwsr/vmtest/impl/ZipFileTest.java
rt/vmtest/src/test/resources/org/apidesign/bck2brwsr/tck/0xfe
rt/vmtest/src/test/resources/org/apidesign/bck2brwsr/tck/Resources.txt
vm/pom.xml
vm/src/main/assembly/bck2brwsr.xml
vm/src/main/java/org/apidesign/vm4brwsr/Bck2Brwsr.java
vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java
vm/src/main/java/org/apidesign/vm4brwsr/LocalsMapper.java
vm/src/main/java/org/apidesign/vm4brwsr/Main.java
vm/src/main/java/org/apidesign/vm4brwsr/ParseMan.java
vm/src/main/java/org/apidesign/vm4brwsr/StackMapper.java
vm/src/main/java/org/apidesign/vm4brwsr/StringArray.java
vm/src/main/java/org/apidesign/vm4brwsr/VM.java
vm/src/main/java/org/apidesign/vm4brwsr/VMLazy.java
vm/src/main/java/org/apidesign/vm4brwsr/VarType.java
vm/src/main/java/org/apidesign/vm4brwsr/Variable.java
vm/src/main/java/org/apidesign/vm4brwsr/Zips.java
vm/src/test/java/org/apidesign/vm4brwsr/Array.java
vm/src/test/java/org/apidesign/vm4brwsr/ArrayTest.java
vm/src/test/java/org/apidesign/vm4brwsr/ByteCodeToJavaScriptTest.java
vm/src/test/java/org/apidesign/vm4brwsr/BytesLoader.java
vm/src/test/java/org/apidesign/vm4brwsr/ClassTest.java
vm/src/test/java/org/apidesign/vm4brwsr/Classes.java
vm/src/test/java/org/apidesign/vm4brwsr/ClassesMarker.java
vm/src/test/java/org/apidesign/vm4brwsr/ClassesNamer.java
vm/src/test/java/org/apidesign/vm4brwsr/Exceptions.java
vm/src/test/java/org/apidesign/vm4brwsr/ExceptionsTest.java
vm/src/test/java/org/apidesign/vm4brwsr/GetByte.java
vm/src/test/java/org/apidesign/vm4brwsr/Instance.java
vm/src/test/java/org/apidesign/vm4brwsr/InstanceSub.java
vm/src/test/java/org/apidesign/vm4brwsr/InstanceSubTest.java
vm/src/test/java/org/apidesign/vm4brwsr/InstanceTest.java
vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java
vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java
vm/src/test/java/org/apidesign/vm4brwsr/Script.java
vm/src/test/java/org/apidesign/vm4brwsr/StaticMethod.java
vm/src/test/java/org/apidesign/vm4brwsr/StaticMethodTest.java
vm/src/test/java/org/apidesign/vm4brwsr/StaticUse.java
vm/src/test/java/org/apidesign/vm4brwsr/StringArrayTest.java
vm/src/test/java/org/apidesign/vm4brwsr/StringSample.java
vm/src/test/java/org/apidesign/vm4brwsr/StringTest.java
vm/src/test/java/org/apidesign/vm4brwsr/SystemTest.java
vm/src/test/java/org/apidesign/vm4brwsr/TestVM.java
vm/src/test/java/org/apidesign/vm4brwsr/VMLazyTest.java
vm/src/test/java/org/apidesign/vm4brwsr/VMinVM.java
vm/src/test/java/org/apidesign/vm4brwsr/VMinVMTest.java
vm/src/test/resources/org/apidesign/vm4brwsr/ko.js
vmtest/pom.xml
vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/BrwsrTest.java
vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Compare.java
vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/HtmlFragment.java
vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Http.java
vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/VMTest.java
vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/Bck2BrwsrCase.java
vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/CompareCase.java
vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/GenerateZip.java
vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/GenerateZipProcessor.java
vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/impl/LaunchSetup.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/AssertionTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/BrwsrCheckTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ByteArithmeticTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/CloneTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/CompareByteArrayTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/CompareHashTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/CompareIntArrayTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/CompareStringsTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/HttpResourceTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/InheritanceA.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/InheritanceB.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/InheritanceTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/IntegerArithmeticTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/LongArithmeticTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ReflectionArrayTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ReflectionTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ResourcesTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ShortArithmeticTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/tck/StaticUse.java
vmtest/src/test/java/org/apidesign/bck2brwsr/vmtest/impl/CRC32Test.java
vmtest/src/test/java/org/apidesign/bck2brwsr/vmtest/impl/ZipEntryTest.java
vmtest/src/test/java/org/apidesign/bck2brwsr/vmtest/impl/ZipFileTest.java
vmtest/src/test/resources/org/apidesign/bck2brwsr/tck/0xfe
vmtest/src/test/resources/org/apidesign/bck2brwsr/tck/Resources.txt
     1.1 --- a/core/pom.xml	Tue Feb 26 14:55:55 2013 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,46 +0,0 @@
     1.4 -<?xml version="1.0"?>
     1.5 -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
     1.6 -    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     1.7 -  <modelVersion>4.0.0</modelVersion>
     1.8 -  <parent>
     1.9 -    <groupId>org.apidesign</groupId>
    1.10 -    <artifactId>bck2brwsr</artifactId>
    1.11 -    <version>0.3-SNAPSHOT</version>
    1.12 -  </parent>
    1.13 -  <groupId>org.apidesign.bck2brwsr</groupId>
    1.14 -  <artifactId>core</artifactId>
    1.15 -  <version>0.3-SNAPSHOT</version>
    1.16 -  <name>Core JS Annotations</name>
    1.17 -  <url>http://maven.apache.org</url>
    1.18 -    <build>
    1.19 -        <plugins>
    1.20 -            <plugin>
    1.21 -                <groupId>org.apache.maven.plugins</groupId>
    1.22 -                <artifactId>maven-compiler-plugin</artifactId>
    1.23 -                <version>2.3.2</version>
    1.24 -                <configuration>
    1.25 -                    <source>1.7</source>
    1.26 -                    <target>1.7</target>
    1.27 -                </configuration>
    1.28 -            </plugin>
    1.29 -        </plugins>
    1.30 -    </build>
    1.31 -    <properties>
    1.32 -    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    1.33 -  </properties>
    1.34 -  <dependencies>
    1.35 -    <dependency>
    1.36 -      <groupId>junit</groupId>
    1.37 -      <artifactId>junit</artifactId>
    1.38 -      <version>3.8.1</version>
    1.39 -      <scope>test</scope>
    1.40 -    </dependency>
    1.41 -    <dependency>
    1.42 -      <groupId>org.netbeans.api</groupId>
    1.43 -      <artifactId>org-openide-util-lookup</artifactId>
    1.44 -      <scope>provided</scope>
    1.45 -    </dependency>
    1.46 -  </dependencies>
    1.47 -    <description>Contains esential annotations for associating JavaScript code with
    1.48 -methods and classes.</description>
    1.49 -</project>
     2.1 --- a/core/src/main/java/org/apidesign/bck2brwsr/core/ExtraJavaScript.java	Tue Feb 26 14:55:55 2013 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,36 +0,0 @@
     2.4 -/**
     2.5 - * Back 2 Browser Bytecode Translator
     2.6 - * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     2.7 - *
     2.8 - * This program is free software: you can redistribute it and/or modify
     2.9 - * it under the terms of the GNU General Public License as published by
    2.10 - * the Free Software Foundation, version 2 of the License.
    2.11 - *
    2.12 - * This program is distributed in the hope that it will be useful,
    2.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.15 - * GNU General Public License for more details.
    2.16 - *
    2.17 - * You should have received a copy of the GNU General Public License
    2.18 - * along with this program. Look for COPYING file in the top folder.
    2.19 - * If not, see http://opensource.org/licenses/GPL-2.0.
    2.20 - */
    2.21 -package org.apidesign.bck2brwsr.core;
    2.22 -
    2.23 -import java.lang.annotation.ElementType;
    2.24 -import java.lang.annotation.Retention;
    2.25 -import java.lang.annotation.RetentionPolicy;
    2.26 -import java.lang.annotation.Target;
    2.27 -
    2.28 -/**
    2.29 - *
    2.30 - * @author Jaroslav Tulach <jtulach@netbeans.org>
    2.31 - */
    2.32 -@Retention(RetentionPolicy.CLASS)
    2.33 -@Target(ElementType.TYPE)
    2.34 -public @interface ExtraJavaScript {
    2.35 -    /** location of a script to load */
    2.36 -    String resource();
    2.37 -    /** should the class file still be processed or not? */
    2.38 -    boolean processByteCode() default true;
    2.39 -}
     3.1 --- a/core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptBody.java	Tue Feb 26 14:55:55 2013 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,51 +0,0 @@
     3.4 -/**
     3.5 - * Back 2 Browser Bytecode Translator
     3.6 - * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     3.7 - *
     3.8 - * This program is free software: you can redistribute it and/or modify
     3.9 - * it under the terms of the GNU General Public License as published by
    3.10 - * the Free Software Foundation, version 2 of the License.
    3.11 - *
    3.12 - * This program is distributed in the hope that it will be useful,
    3.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.15 - * GNU General Public License for more details.
    3.16 - *
    3.17 - * You should have received a copy of the GNU General Public License
    3.18 - * along with this program. Look for COPYING file in the top folder.
    3.19 - * If not, see http://opensource.org/licenses/GPL-2.0.
    3.20 - */
    3.21 -package org.apidesign.bck2brwsr.core;
    3.22 -
    3.23 -import java.lang.annotation.ElementType;
    3.24 -import java.lang.annotation.Retention;
    3.25 -import java.lang.annotation.RetentionPolicy;
    3.26 -import java.lang.annotation.Target;
    3.27 -
    3.28 -/** Put this method on a method in case it should have a special
    3.29 - * body in the <em>JavaScript</em>.
    3.30 - *
    3.31 - * @author Jaroslav Tulach <jtulach@netbeans.org>
    3.32 - */
    3.33 -@Retention(RetentionPolicy.CLASS)
    3.34 -@Target({ ElementType.METHOD, ElementType.CONSTRUCTOR })
    3.35 -public @interface JavaScriptBody {
    3.36 -    /** Names of parameters for the method. 
    3.37 -     * 
    3.38 -     * <!--
    3.39 -     * If not specified
    3.40 -     * it will be <code>arg0, arg1, arg2</code>. In case of
    3.41 -     * instance methods, the <code>arg0</code> is reference
    3.42 -     * to <code>this</code>.
    3.43 -     * -->
    3.44 -     * 
    3.45 -     * @return array of the names of parameters for the method
    3.46 -     *    in JavaScript
    3.47 -     */
    3.48 -    public String[] args();
    3.49 -    
    3.50 -    /** The actual body of the method in JavaScript. This string will be
    3.51 -     * put into generated header (ends with '{') and footer (ends with '}').
    3.52 -     */
    3.53 -    public String body();
    3.54 -}
     4.1 --- a/core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptOnly.java	Tue Feb 26 14:55:55 2013 +0100
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,37 +0,0 @@
     4.4 -/**
     4.5 - * Back 2 Browser Bytecode Translator
     4.6 - * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     4.7 - *
     4.8 - * This program is free software: you can redistribute it and/or modify
     4.9 - * it under the terms of the GNU General Public License as published by
    4.10 - * the Free Software Foundation, version 2 of the License.
    4.11 - *
    4.12 - * This program is distributed in the hope that it will be useful,
    4.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4.15 - * GNU General Public License for more details.
    4.16 - *
    4.17 - * You should have received a copy of the GNU General Public License
    4.18 - * along with this program. Look for COPYING file in the top folder.
    4.19 - * If not, see http://opensource.org/licenses/GPL-2.0.
    4.20 - */
    4.21 -package org.apidesign.bck2brwsr.core;
    4.22 -
    4.23 -import java.lang.annotation.ElementType;
    4.24 -import java.lang.annotation.Retention;
    4.25 -import java.lang.annotation.RetentionPolicy;
    4.26 -import java.lang.annotation.Target;
    4.27 -
    4.28 -/** Don't include given field or method in generated JavaScript. Rather
    4.29 - * generate completely independent JavaScript code.
    4.30 - *
    4.31 - * @author Jaroslav Tulach <jtulach@netbeans.org>
    4.32 - */
    4.33 -@Retention(RetentionPolicy.CLASS)
    4.34 -@Target({ ElementType.METHOD, ElementType.FIELD })
    4.35 -public @interface JavaScriptOnly {
    4.36 -    /** name of the variable to assign given value to */
    4.37 -    String name() default "";
    4.38 -    /** value to assign to given field */
    4.39 -    String value() default "";
    4.40 -}
     5.1 --- a/core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptPrototype.java	Tue Feb 26 14:55:55 2013 +0100
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,44 +0,0 @@
     5.4 -/**
     5.5 - * Back 2 Browser Bytecode Translator
     5.6 - * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     5.7 - *
     5.8 - * This program is free software: you can redistribute it and/or modify
     5.9 - * it under the terms of the GNU General Public License as published by
    5.10 - * the Free Software Foundation, version 2 of the License.
    5.11 - *
    5.12 - * This program is distributed in the hope that it will be useful,
    5.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    5.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    5.15 - * GNU General Public License for more details.
    5.16 - *
    5.17 - * You should have received a copy of the GNU General Public License
    5.18 - * along with this program. Look for COPYING file in the top folder.
    5.19 - * If not, see http://opensource.org/licenses/GPL-2.0.
    5.20 - */
    5.21 -package org.apidesign.bck2brwsr.core;
    5.22 -
    5.23 -import java.lang.annotation.ElementType;
    5.24 -import java.lang.annotation.Retention;
    5.25 -import java.lang.annotation.RetentionPolicy;
    5.26 -import java.lang.annotation.Target;
    5.27 -
    5.28 -/** Controls how JavaScript inheritance should be handled.
    5.29 - * @author Jaroslav Tulach <jtulach@netbeans.org>
    5.30 - */
    5.31 -@Retention(RetentionPolicy.CLASS)
    5.32 -@Target({ ElementType.TYPE })
    5.33 -public @interface JavaScriptPrototype {
    5.34 -    /** Expression that identifies the function where all methods
    5.35 -     * should be added into. If this attribute is unspecified
    5.36 -     * all methods are added to the same object specified by
    5.37 -     * {@link #prototype()}.
    5.38 -     * 
    5.39 -     * @return name of function to contain methods found in given class
    5.40 -     */
    5.41 -    String container() default "";
    5.42 -    /** Expression that defines the way to construct prototype for this
    5.43 -     * class.
    5.44 -     * @return expression to construct prototype
    5.45 -     */
    5.46 -    String prototype();
    5.47 -}
     6.1 --- a/core/src/main/java/org/apidesign/bck2brwsr/core/impl/JavaScriptProcesor.java	Tue Feb 26 14:55:55 2013 +0100
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,100 +0,0 @@
     6.4 -/**
     6.5 - * Back 2 Browser Bytecode Translator
     6.6 - * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     6.7 - *
     6.8 - * This program is free software: you can redistribute it and/or modify
     6.9 - * it under the terms of the GNU General Public License as published by
    6.10 - * the Free Software Foundation, version 2 of the License.
    6.11 - *
    6.12 - * This program is distributed in the hope that it will be useful,
    6.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    6.15 - * GNU General Public License for more details.
    6.16 - *
    6.17 - * You should have received a copy of the GNU General Public License
    6.18 - * along with this program. Look for COPYING file in the top folder.
    6.19 - * If not, see http://opensource.org/licenses/GPL-2.0.
    6.20 - */
    6.21 -package org.apidesign.bck2brwsr.core.impl;
    6.22 -
    6.23 -import java.util.Collections;
    6.24 -import java.util.HashSet;
    6.25 -import java.util.List;
    6.26 -import java.util.Set;
    6.27 -import javax.annotation.processing.AbstractProcessor;
    6.28 -import javax.annotation.processing.Completion;
    6.29 -import javax.annotation.processing.Completions;
    6.30 -import javax.annotation.processing.Messager;
    6.31 -import javax.annotation.processing.Processor;
    6.32 -import javax.annotation.processing.RoundEnvironment;
    6.33 -import javax.lang.model.element.AnnotationMirror;
    6.34 -import javax.lang.model.element.Element;
    6.35 -import javax.lang.model.element.ElementKind;
    6.36 -import javax.lang.model.element.ExecutableElement;
    6.37 -import javax.lang.model.element.TypeElement;
    6.38 -import javax.lang.model.element.VariableElement;
    6.39 -import javax.lang.model.type.TypeKind;
    6.40 -import javax.tools.Diagnostic;
    6.41 -import org.apidesign.bck2brwsr.core.JavaScriptBody;
    6.42 -import org.openide.util.lookup.ServiceProvider;
    6.43 -
    6.44 -/**
    6.45 - *
    6.46 - * @author Jaroslav Tulach <jtulach@netbeans.org>
    6.47 - */
    6.48 -@ServiceProvider(service = Processor.class)
    6.49 -public final class JavaScriptProcesor extends AbstractProcessor {
    6.50 -    @Override
    6.51 -    public Set<String> getSupportedAnnotationTypes() {
    6.52 -        Set<String> set = new HashSet<>();
    6.53 -        set.add(JavaScriptBody.class.getName());
    6.54 -        return set;
    6.55 -    }
    6.56 -    
    6.57 -    @Override
    6.58 -    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
    6.59 -        final Messager msg = processingEnv.getMessager();
    6.60 -        for (Element e : roundEnv.getElementsAnnotatedWith(JavaScriptBody.class)) {
    6.61 -            if (e.getKind() != ElementKind.METHOD && e.getKind() != ElementKind.CONSTRUCTOR) {
    6.62 -                continue;
    6.63 -            }
    6.64 -            ExecutableElement ee = (ExecutableElement)e;
    6.65 -            List<? extends VariableElement> params = ee.getParameters();
    6.66 -            
    6.67 -            JavaScriptBody jsb = e.getAnnotation(JavaScriptBody.class);
    6.68 -            if (jsb == null) {
    6.69 -                continue;
    6.70 -            }
    6.71 -            String[] arr = jsb.args();
    6.72 -            if (params.size() != arr.length) {
    6.73 -                msg.printMessage(Diagnostic.Kind.ERROR, "Number of args arguments does not match real arguments!", e);
    6.74 -            }
    6.75 -            if (ee.getReturnType().getKind() == TypeKind.LONG) {
    6.76 -                msg.printMessage(Diagnostic.Kind.WARNING, "Don't return long. Return double and convert it to long in Java code.", e);
    6.77 -            }
    6.78 -        }
    6.79 -        return true;
    6.80 -    }
    6.81 -
    6.82 -    @Override
    6.83 -    public Iterable<? extends Completion> getCompletions(Element e, 
    6.84 -        AnnotationMirror annotation, ExecutableElement member, String userText
    6.85 -    ) {
    6.86 -        StringBuilder sb = new StringBuilder();
    6.87 -        if (e.getKind() == ElementKind.METHOD && member.getSimpleName().contentEquals("args")) {
    6.88 -            ExecutableElement ee = (ExecutableElement) e;
    6.89 -            String sep = "";
    6.90 -            sb.append("{ ");
    6.91 -            for (VariableElement ve : ee.getParameters()) {
    6.92 -                sb.append(sep).append('"').append(ve.getSimpleName())
    6.93 -                    .append('"');
    6.94 -                sep = ", ";
    6.95 -            }
    6.96 -            sb.append(" }");
    6.97 -            return Collections.nCopies(1, Completions.of(sb.toString()));
    6.98 -        }
    6.99 -        return null;
   6.100 -    }
   6.101 -
   6.102 -    
   6.103 -}
     7.1 --- a/emul/compact/pom.xml	Tue Feb 26 14:55:55 2013 +0100
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,72 +0,0 @@
     7.4 -<?xml version="1.0"?>
     7.5 -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
     7.6 -    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     7.7 -  <modelVersion>4.0.0</modelVersion>
     7.8 -  <parent>
     7.9 -    <groupId>org.apidesign.bck2brwsr</groupId>
    7.10 -    <artifactId>emul.pom</artifactId>
    7.11 -    <version>0.3-SNAPSHOT</version>
    7.12 -  </parent>
    7.13 -  <groupId>org.apidesign.bck2brwsr</groupId>
    7.14 -  <artifactId>emul</artifactId>
    7.15 -  <version>0.3-SNAPSHOT</version>
    7.16 -  <name>Bck2Brwsr API Profile</name>
    7.17 -  <url>http://maven.apache.org</url>
    7.18 -  <properties>
    7.19 -    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    7.20 -  </properties>
    7.21 -  <dependencies>
    7.22 -    <dependency>
    7.23 -      <groupId>${project.groupId}</groupId>
    7.24 -      <artifactId>emul.mini</artifactId>
    7.25 -      <version>${project.version}</version>
    7.26 -      <scope>provided</scope>
    7.27 -    </dependency>
    7.28 -    <dependency>
    7.29 -      <groupId>${project.groupId}</groupId>
    7.30 -      <artifactId>vmtest</artifactId>
    7.31 -      <version>${project.version}</version>
    7.32 -      <scope>test</scope>
    7.33 -    </dependency>
    7.34 -    <dependency>
    7.35 -      <groupId>org.netbeans.api</groupId>
    7.36 -      <artifactId>org-openide-util-lookup</artifactId>
    7.37 -      <scope>test</scope>
    7.38 -    </dependency>
    7.39 -  </dependencies>
    7.40 -  <build>
    7.41 -      <plugins>
    7.42 -          <plugin>
    7.43 -              <groupId>org.apache.maven.plugins</groupId>
    7.44 -              <artifactId>maven-compiler-plugin</artifactId>
    7.45 -              <version>2.5.1</version>
    7.46 -              <configuration>
    7.47 -                  <compilerArguments>
    7.48 -                      <bootclasspath>netbeans.ignore.jdk.bootclasspath</bootclasspath>
    7.49 -                  </compilerArguments>
    7.50 -                 <source>1.7</source>
    7.51 -                 <target>1.7</target>
    7.52 -              </configuration>
    7.53 -          </plugin>
    7.54 -         <plugin>
    7.55 -            <artifactId>maven-assembly-plugin</artifactId>
    7.56 -                <version>2.4</version>
    7.57 -                <executions>
    7.58 -                    <execution>
    7.59 -                        <id>rt</id>
    7.60 -                        <phase>package</phase>
    7.61 -                        <goals>
    7.62 -                            <goal>single</goal>
    7.63 -                        </goals>
    7.64 -                        <configuration>
    7.65 -                            <descriptors>
    7.66 -                                <descriptor>src/main/assembly/rt.xml</descriptor>
    7.67 -                            </descriptors>
    7.68 -                            <finalName>bck2brwsr-${project.version}</finalName>
    7.69 -                        </configuration>
    7.70 -                    </execution>
    7.71 -                </executions>                
    7.72 -            </plugin>      
    7.73 -      </plugins>
    7.74 -  </build>
    7.75 -</project>
     8.1 --- a/emul/compact/src/main/assembly/rt.xml	Tue Feb 26 14:55:55 2013 +0100
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,26 +0,0 @@
     8.4 -<?xml version="1.0"?>
     8.5 -<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
     8.6 -  <id>rt</id>
     8.7 -  <formats>
     8.8 -    <format>jar</format>
     8.9 -  </formats>
    8.10 -  <includeBaseDirectory>false</includeBaseDirectory>
    8.11 -  <dependencySets>
    8.12 -    <dependencySet>
    8.13 -      <useProjectArtifact>true</useProjectArtifact>
    8.14 -      <unpack>true</unpack>
    8.15 -      <scope>provided</scope>
    8.16 -      <unpackOptions>
    8.17 -        <excludes>
    8.18 -          <exclude>META-INF/maven/**</exclude>
    8.19 -        </excludes>
    8.20 -      </unpackOptions>
    8.21 -    </dependencySet>
    8.22 -  </dependencySets>
    8.23 -  <fileSets>
    8.24 -    <fileSet>
    8.25 -      <directory>${project.build.outputDirectory}</directory>
    8.26 -      <outputDirectory>/</outputDirectory>
    8.27 -    </fileSet>
    8.28 -  </fileSets>
    8.29 -</assembly>
    8.30 \ No newline at end of file
     9.1 --- a/emul/compact/src/main/java/java/beans/ChangeListenerMap.java	Tue Feb 26 14:55:55 2013 +0100
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,248 +0,0 @@
     9.4 -/*
     9.5 - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
     9.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     9.7 - *
     9.8 - * This code is free software; you can redistribute it and/or modify it
     9.9 - * under the terms of the GNU General Public License version 2 only, as
    9.10 - * published by the Free Software Foundation.  Oracle designates this
    9.11 - * particular file as subject to the "Classpath" exception as provided
    9.12 - * by Oracle in the LICENSE file that accompanied this code.
    9.13 - *
    9.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
    9.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    9.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    9.17 - * version 2 for more details (a copy is included in the LICENSE file that
    9.18 - * accompanied this code).
    9.19 - *
    9.20 - * You should have received a copy of the GNU General Public License version
    9.21 - * 2 along with this work; if not, write to the Free Software Foundation,
    9.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    9.23 - *
    9.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    9.25 - * or visit www.oracle.com if you need additional information or have any
    9.26 - * questions.
    9.27 - */
    9.28 -package java.beans;
    9.29 -
    9.30 -import java.util.ArrayList;
    9.31 -import java.util.Collections;
    9.32 -import java.util.EventListener;
    9.33 -import java.util.EventListenerProxy;
    9.34 -import java.util.HashMap;
    9.35 -import java.util.List;
    9.36 -import java.util.Map;
    9.37 -import java.util.Map.Entry;
    9.38 -import java.util.Set;
    9.39 -import org.apidesign.bck2brwsr.emul.lang.System;
    9.40 -
    9.41 -/**
    9.42 - * This is an abstract class that provides base functionality
    9.43 - * for the {@link PropertyChangeSupport PropertyChangeSupport} class
    9.44 - * and the {@link VetoableChangeSupport VetoableChangeSupport} class.
    9.45 - *
    9.46 - * @see PropertyChangeListenerMap
    9.47 - * @see VetoableChangeListenerMap
    9.48 - *
    9.49 - * @author Sergey A. Malenkov
    9.50 - */
    9.51 -abstract class ChangeListenerMap<L extends EventListener> {
    9.52 -    private Map<String, L[]> map;
    9.53 -
    9.54 -    /**
    9.55 -     * Creates an array of listeners.
    9.56 -     * This method can be optimized by using
    9.57 -     * the same instance of the empty array
    9.58 -     * when {@code length} is equal to {@code 0}.
    9.59 -     *
    9.60 -     * @param length  the array length
    9.61 -     * @return        an array with specified length
    9.62 -     */
    9.63 -    protected abstract L[] newArray(int length);
    9.64 -
    9.65 -    /**
    9.66 -     * Creates a proxy listener for the specified property.
    9.67 -     *
    9.68 -     * @param name      the name of the property to listen on
    9.69 -     * @param listener  the listener to process events
    9.70 -     * @return          a proxy listener
    9.71 -     */
    9.72 -    protected abstract L newProxy(String name, L listener);
    9.73 -
    9.74 -    /**
    9.75 -     * Adds a listener to the list of listeners for the specified property.
    9.76 -     * This listener is called as many times as it was added.
    9.77 -     *
    9.78 -     * @param name      the name of the property to listen on
    9.79 -     * @param listener  the listener to process events
    9.80 -     */
    9.81 -    public final synchronized void add(String name, L listener) {
    9.82 -        if (this.map == null) {
    9.83 -            this.map = new HashMap<String, L[]>();
    9.84 -        }
    9.85 -        L[] array = this.map.get(name);
    9.86 -        int size = (array != null)
    9.87 -                ? array.length
    9.88 -                : 0;
    9.89 -
    9.90 -        L[] clone = newArray(size + 1);
    9.91 -        clone[size] = listener;
    9.92 -        if (array != null) {
    9.93 -            System.arraycopy(array, 0, clone, 0, size);
    9.94 -        }
    9.95 -        this.map.put(name, clone);
    9.96 -    }
    9.97 -
    9.98 -    /**
    9.99 -     * Removes a listener from the list of listeners for the specified property.
   9.100 -     * If the listener was added more than once to the same event source,
   9.101 -     * this listener will be notified one less time after being removed.
   9.102 -     *
   9.103 -     * @param name      the name of the property to listen on
   9.104 -     * @param listener  the listener to process events
   9.105 -     */
   9.106 -    public final synchronized void remove(String name, L listener) {
   9.107 -        if (this.map != null) {
   9.108 -            L[] array = this.map.get(name);
   9.109 -            if (array != null) {
   9.110 -                for (int i = 0; i < array.length; i++) {
   9.111 -                    if (listener.equals(array[i])) {
   9.112 -                        int size = array.length - 1;
   9.113 -                        if (size > 0) {
   9.114 -                            L[] clone = newArray(size);
   9.115 -                            System.arraycopy(array, 0, clone, 0, i);
   9.116 -                            System.arraycopy(array, i + 1, clone, i, size - i);
   9.117 -                            this.map.put(name, clone);
   9.118 -                        }
   9.119 -                        else {
   9.120 -                            this.map.remove(name);
   9.121 -                            if (this.map.isEmpty()) {
   9.122 -                                this.map = null;
   9.123 -                            }
   9.124 -                        }
   9.125 -                        break;
   9.126 -                    }
   9.127 -                }
   9.128 -            }
   9.129 -        }
   9.130 -    }
   9.131 -
   9.132 -    /**
   9.133 -     * Returns the list of listeners for the specified property.
   9.134 -     *
   9.135 -     * @param name  the name of the property
   9.136 -     * @return      the corresponding list of listeners
   9.137 -     */
   9.138 -    public final synchronized L[] get(String name) {
   9.139 -        return (this.map != null)
   9.140 -                ? this.map.get(name)
   9.141 -                : null;
   9.142 -    }
   9.143 -
   9.144 -    /**
   9.145 -     * Sets new list of listeners for the specified property.
   9.146 -     *
   9.147 -     * @param name       the name of the property
   9.148 -     * @param listeners  new list of listeners
   9.149 -     */
   9.150 -    public final void set(String name, L[] listeners) {
   9.151 -        if (listeners != null) {
   9.152 -            if (this.map == null) {
   9.153 -                this.map = new HashMap<String, L[]>();
   9.154 -            }
   9.155 -            this.map.put(name, listeners);
   9.156 -        }
   9.157 -        else if (this.map != null) {
   9.158 -            this.map.remove(name);
   9.159 -            if (this.map.isEmpty()) {
   9.160 -                this.map = null;
   9.161 -            }
   9.162 -        }
   9.163 -    }
   9.164 -
   9.165 -    /**
   9.166 -     * Returns all listeners in the map.
   9.167 -     *
   9.168 -     * @return an array of all listeners
   9.169 -     */
   9.170 -    public final synchronized L[] getListeners() {
   9.171 -        if (this.map == null) {
   9.172 -            return newArray(0);
   9.173 -        }
   9.174 -        List<L> list = new ArrayList<L>();
   9.175 -
   9.176 -        L[] listeners = this.map.get(null);
   9.177 -        if (listeners != null) {
   9.178 -            for (L listener : listeners) {
   9.179 -                list.add(listener);
   9.180 -            }
   9.181 -        }
   9.182 -        for (Entry<String, L[]> entry : this.map.entrySet()) {
   9.183 -            String name = entry.getKey();
   9.184 -            if (name != null) {
   9.185 -                for (L listener : entry.getValue()) {
   9.186 -                    list.add(newProxy(name, listener));
   9.187 -                }
   9.188 -            }
   9.189 -        }
   9.190 -        return list.toArray(newArray(list.size()));
   9.191 -    }
   9.192 -
   9.193 -    /**
   9.194 -     * Returns listeners that have been associated with the named property.
   9.195 -     *
   9.196 -     * @param name  the name of the property
   9.197 -     * @return an array of listeners for the named property
   9.198 -     */
   9.199 -    public final L[] getListeners(String name) {
   9.200 -        if (name != null) {
   9.201 -            L[] listeners = get(name);
   9.202 -            if (listeners != null) {
   9.203 -                return listeners.clone();
   9.204 -            }
   9.205 -        }
   9.206 -        return newArray(0);
   9.207 -    }
   9.208 -
   9.209 -    /**
   9.210 -     * Indicates whether the map contains
   9.211 -     * at least one listener to be notified.
   9.212 -     *
   9.213 -     * @param name  the name of the property
   9.214 -     * @return      {@code true} if at least one listener exists or
   9.215 -     *              {@code false} otherwise
   9.216 -     */
   9.217 -    public final synchronized boolean hasListeners(String name) {
   9.218 -        if (this.map == null) {
   9.219 -            return false;
   9.220 -        }
   9.221 -        L[] array = this.map.get(null);
   9.222 -        return (array != null) || ((name != null) && (null != this.map.get(name)));
   9.223 -    }
   9.224 -
   9.225 -    /**
   9.226 -     * Returns a set of entries from the map.
   9.227 -     * Each entry is a pair consisted of the property name
   9.228 -     * and the corresponding list of listeners.
   9.229 -     *
   9.230 -     * @return a set of entries from the map
   9.231 -     */
   9.232 -    public final Set<Entry<String, L[]>> getEntries() {
   9.233 -        return (this.map != null)
   9.234 -                ? this.map.entrySet()
   9.235 -                : Collections.<Entry<String, L[]>>emptySet();
   9.236 -    }
   9.237 -
   9.238 -    /**
   9.239 -     * Extracts a real listener from the proxy listener.
   9.240 -     * It is necessary because default proxy class is not serializable.
   9.241 -     *
   9.242 -     * @return a real listener
   9.243 -     */
   9.244 -    public final L extract(L listener) {
   9.245 -        while (listener instanceof EventListenerProxy) {
   9.246 -            EventListenerProxy<L> proxy = (EventListenerProxy<L>) listener;
   9.247 -            listener = proxy.getListener();
   9.248 -        }
   9.249 -        return listener;
   9.250 -    }
   9.251 -}
    10.1 --- a/emul/compact/src/main/java/java/beans/IndexedPropertyChangeEvent.java	Tue Feb 26 14:55:55 2013 +0100
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,78 +0,0 @@
    10.4 -/*
    10.5 - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
    10.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.7 - *
    10.8 - * This code is free software; you can redistribute it and/or modify it
    10.9 - * under the terms of the GNU General Public License version 2 only, as
   10.10 - * published by the Free Software Foundation.  Oracle designates this
   10.11 - * particular file as subject to the "Classpath" exception as provided
   10.12 - * by Oracle in the LICENSE file that accompanied this code.
   10.13 - *
   10.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   10.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   10.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   10.17 - * version 2 for more details (a copy is included in the LICENSE file that
   10.18 - * accompanied this code).
   10.19 - *
   10.20 - * You should have received a copy of the GNU General Public License version
   10.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   10.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   10.23 - *
   10.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   10.25 - * or visit www.oracle.com if you need additional information or have any
   10.26 - * questions.
   10.27 - */
   10.28 -package java.beans;
   10.29 -
   10.30 -/**
   10.31 - * An "IndexedPropertyChange" event gets delivered whenever a component that
   10.32 - * conforms to the JavaBeans&trade; specification (a "bean") changes a bound
   10.33 - * indexed property. This class is an extension of <code>PropertyChangeEvent</code>
   10.34 - * but contains the index of the property that has changed.
   10.35 - * <P>
   10.36 - * Null values may be provided for the old and the new values if their
   10.37 - * true values are not known.
   10.38 - * <P>
   10.39 - * An event source may send a null object as the name to indicate that an
   10.40 - * arbitrary set of if its properties have changed.  In this case the
   10.41 - * old and new values should also be null.
   10.42 - *
   10.43 - * @since 1.5
   10.44 - * @author Mark Davidson
   10.45 - */
   10.46 -public class IndexedPropertyChangeEvent extends PropertyChangeEvent {
   10.47 -    private static final long serialVersionUID = -320227448495806870L;
   10.48 -
   10.49 -    private int index;
   10.50 -
   10.51 -    /**
   10.52 -     * Constructs a new <code>IndexedPropertyChangeEvent</code> object.
   10.53 -     *
   10.54 -     * @param source  The bean that fired the event.
   10.55 -     * @param propertyName  The programmatic name of the property that
   10.56 -     *             was changed.
   10.57 -     * @param oldValue      The old value of the property.
   10.58 -     * @param newValue      The new value of the property.
   10.59 -     * @param index index of the property element that was changed.
   10.60 -     */
   10.61 -    public IndexedPropertyChangeEvent(Object source, String propertyName,
   10.62 -                                      Object oldValue, Object newValue,
   10.63 -                                      int index) {
   10.64 -        super (source, propertyName, oldValue, newValue);
   10.65 -        this.index = index;
   10.66 -    }
   10.67 -
   10.68 -    /**
   10.69 -     * Gets the index of the property that was changed.
   10.70 -     *
   10.71 -     * @return The index specifying the property element that was
   10.72 -     *         changed.
   10.73 -     */
   10.74 -    public int getIndex() {
   10.75 -        return index;
   10.76 -    }
   10.77 -
   10.78 -    void appendTo(StringBuilder sb) {
   10.79 -        sb.append("; index=").append(getIndex());
   10.80 -    }
   10.81 -}
    11.1 --- a/emul/compact/src/main/java/java/beans/PropertyChangeEvent.java	Tue Feb 26 14:55:55 2013 +0100
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,164 +0,0 @@
    11.4 -/*
    11.5 - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
    11.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    11.7 - *
    11.8 - * This code is free software; you can redistribute it and/or modify it
    11.9 - * under the terms of the GNU General Public License version 2 only, as
   11.10 - * published by the Free Software Foundation.  Oracle designates this
   11.11 - * particular file as subject to the "Classpath" exception as provided
   11.12 - * by Oracle in the LICENSE file that accompanied this code.
   11.13 - *
   11.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   11.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   11.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   11.17 - * version 2 for more details (a copy is included in the LICENSE file that
   11.18 - * accompanied this code).
   11.19 - *
   11.20 - * You should have received a copy of the GNU General Public License version
   11.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   11.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   11.23 - *
   11.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   11.25 - * or visit www.oracle.com if you need additional information or have any
   11.26 - * questions.
   11.27 - */
   11.28 -
   11.29 -package java.beans;
   11.30 -
   11.31 -/**
   11.32 - * A "PropertyChange" event gets delivered whenever a bean changes a "bound"
   11.33 - * or "constrained" property.  A PropertyChangeEvent object is sent as an
   11.34 - * argument to the PropertyChangeListener and VetoableChangeListener methods.
   11.35 - * <P>
   11.36 - * Normally PropertyChangeEvents are accompanied by the name and the old
   11.37 - * and new value of the changed property.  If the new value is a primitive
   11.38 - * type (such as int or boolean) it must be wrapped as the
   11.39 - * corresponding java.lang.* Object type (such as Integer or Boolean).
   11.40 - * <P>
   11.41 - * Null values may be provided for the old and the new values if their
   11.42 - * true values are not known.
   11.43 - * <P>
   11.44 - * An event source may send a null object as the name to indicate that an
   11.45 - * arbitrary set of if its properties have changed.  In this case the
   11.46 - * old and new values should also be null.
   11.47 - */
   11.48 -
   11.49 -public class PropertyChangeEvent extends java.util.EventObject {
   11.50 -    private static final long serialVersionUID = 7042693688939648123L;
   11.51 -
   11.52 -    /**
   11.53 -     * Constructs a new <code>PropertyChangeEvent</code>.
   11.54 -     *
   11.55 -     * @param source  The bean that fired the event.
   11.56 -     * @param propertyName  The programmatic name of the property
   11.57 -     *          that was changed.
   11.58 -     * @param oldValue  The old value of the property.
   11.59 -     * @param newValue  The new value of the property.
   11.60 -     */
   11.61 -    public PropertyChangeEvent(Object source, String propertyName,
   11.62 -                                     Object oldValue, Object newValue) {
   11.63 -        super(source);
   11.64 -        this.propertyName = propertyName;
   11.65 -        this.newValue = newValue;
   11.66 -        this.oldValue = oldValue;
   11.67 -    }
   11.68 -
   11.69 -    /**
   11.70 -     * Gets the programmatic name of the property that was changed.
   11.71 -     *
   11.72 -     * @return  The programmatic name of the property that was changed.
   11.73 -     *          May be null if multiple properties have changed.
   11.74 -     */
   11.75 -    public String getPropertyName() {
   11.76 -        return propertyName;
   11.77 -    }
   11.78 -
   11.79 -    /**
   11.80 -     * Gets the new value for the property, expressed as an Object.
   11.81 -     *
   11.82 -     * @return  The new value for the property, expressed as an Object.
   11.83 -     *          May be null if multiple properties have changed.
   11.84 -     */
   11.85 -    public Object getNewValue() {
   11.86 -        return newValue;
   11.87 -    }
   11.88 -
   11.89 -    /**
   11.90 -     * Gets the old value for the property, expressed as an Object.
   11.91 -     *
   11.92 -     * @return  The old value for the property, expressed as an Object.
   11.93 -     *          May be null if multiple properties have changed.
   11.94 -     */
   11.95 -    public Object getOldValue() {
   11.96 -        return oldValue;
   11.97 -    }
   11.98 -
   11.99 -    /**
  11.100 -     * Sets the propagationId object for the event.
  11.101 -     *
  11.102 -     * @param propagationId  The propagationId object for the event.
  11.103 -     */
  11.104 -    public void setPropagationId(Object propagationId) {
  11.105 -        this.propagationId = propagationId;
  11.106 -    }
  11.107 -
  11.108 -    /**
  11.109 -     * The "propagationId" field is reserved for future use.  In Beans 1.0
  11.110 -     * the sole requirement is that if a listener catches a PropertyChangeEvent
  11.111 -     * and then fires a PropertyChangeEvent of its own, then it should
  11.112 -     * make sure that it propagates the propagationId field from its
  11.113 -     * incoming event to its outgoing event.
  11.114 -     *
  11.115 -     * @return the propagationId object associated with a bound/constrained
  11.116 -     *          property update.
  11.117 -     */
  11.118 -    public Object getPropagationId() {
  11.119 -        return propagationId;
  11.120 -    }
  11.121 -
  11.122 -    /**
  11.123 -     * name of the property that changed.  May be null, if not known.
  11.124 -     * @serial
  11.125 -     */
  11.126 -    private String propertyName;
  11.127 -
  11.128 -    /**
  11.129 -     * New value for property.  May be null if not known.
  11.130 -     * @serial
  11.131 -     */
  11.132 -    private Object newValue;
  11.133 -
  11.134 -    /**
  11.135 -     * Previous value for property.  May be null if not known.
  11.136 -     * @serial
  11.137 -     */
  11.138 -    private Object oldValue;
  11.139 -
  11.140 -    /**
  11.141 -     * Propagation ID.  May be null.
  11.142 -     * @serial
  11.143 -     * @see #getPropagationId
  11.144 -     */
  11.145 -    private Object propagationId;
  11.146 -
  11.147 -    /**
  11.148 -     * Returns a string representation of the object.
  11.149 -     *
  11.150 -     * @return a string representation of the object
  11.151 -     *
  11.152 -     * @since 1.7
  11.153 -     */
  11.154 -    public String toString() {
  11.155 -        StringBuilder sb = new StringBuilder(getClass().getName());
  11.156 -        sb.append("[propertyName=").append(getPropertyName());
  11.157 -        appendTo(sb);
  11.158 -        sb.append("; oldValue=").append(getOldValue());
  11.159 -        sb.append("; newValue=").append(getNewValue());
  11.160 -        sb.append("; propagationId=").append(getPropagationId());
  11.161 -        sb.append("; source=").append(getSource());
  11.162 -        return sb.append("]").toString();
  11.163 -    }
  11.164 -
  11.165 -    void appendTo(StringBuilder sb) {
  11.166 -    }
  11.167 -}
    12.1 --- a/emul/compact/src/main/java/java/beans/PropertyChangeListener.java	Tue Feb 26 14:55:55 2013 +0100
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,44 +0,0 @@
    12.4 -/*
    12.5 - * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
    12.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    12.7 - *
    12.8 - * This code is free software; you can redistribute it and/or modify it
    12.9 - * under the terms of the GNU General Public License version 2 only, as
   12.10 - * published by the Free Software Foundation.  Oracle designates this
   12.11 - * particular file as subject to the "Classpath" exception as provided
   12.12 - * by Oracle in the LICENSE file that accompanied this code.
   12.13 - *
   12.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   12.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   12.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   12.17 - * version 2 for more details (a copy is included in the LICENSE file that
   12.18 - * accompanied this code).
   12.19 - *
   12.20 - * You should have received a copy of the GNU General Public License version
   12.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   12.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   12.23 - *
   12.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   12.25 - * or visit www.oracle.com if you need additional information or have any
   12.26 - * questions.
   12.27 - */
   12.28 -
   12.29 -package java.beans;
   12.30 -
   12.31 -/**
   12.32 - * A "PropertyChange" event gets fired whenever a bean changes a "bound"
   12.33 - * property.  You can register a PropertyChangeListener with a source
   12.34 - * bean so as to be notified of any bound property updates.
   12.35 - */
   12.36 -
   12.37 -public interface PropertyChangeListener extends java.util.EventListener {
   12.38 -
   12.39 -    /**
   12.40 -     * This method gets called when a bound property is changed.
   12.41 -     * @param evt A PropertyChangeEvent object describing the event source
   12.42 -     *          and the property that has changed.
   12.43 -     */
   12.44 -
   12.45 -    void propertyChange(PropertyChangeEvent evt);
   12.46 -
   12.47 -}
    13.1 --- a/emul/compact/src/main/java/java/beans/PropertyChangeListenerProxy.java	Tue Feb 26 14:55:55 2013 +0100
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,81 +0,0 @@
    13.4 -/*
    13.5 - * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
    13.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    13.7 - *
    13.8 - * This code is free software; you can redistribute it and/or modify it
    13.9 - * under the terms of the GNU General Public License version 2 only, as
   13.10 - * published by the Free Software Foundation.  Oracle designates this
   13.11 - * particular file as subject to the "Classpath" exception as provided
   13.12 - * by Oracle in the LICENSE file that accompanied this code.
   13.13 - *
   13.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   13.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   13.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   13.17 - * version 2 for more details (a copy is included in the LICENSE file that
   13.18 - * accompanied this code).
   13.19 - *
   13.20 - * You should have received a copy of the GNU General Public License version
   13.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   13.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   13.23 - *
   13.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   13.25 - * or visit www.oracle.com if you need additional information or have any
   13.26 - * questions.
   13.27 - */
   13.28 -
   13.29 -package java.beans;
   13.30 -
   13.31 -import java.util.EventListenerProxy;
   13.32 -
   13.33 -/**
   13.34 - * A class which extends the {@code EventListenerProxy}
   13.35 - * specifically for adding a {@code PropertyChangeListener}
   13.36 - * with a "bound" property.
   13.37 - * Instances of this class can be added
   13.38 - * as {@code PropertyChangeListener}s to a bean
   13.39 - * which supports firing property change events.
   13.40 - * <p>
   13.41 - * If the object has a {@code getPropertyChangeListeners} method
   13.42 - * then the array returned could be a mixture of {@code PropertyChangeListener}
   13.43 - * and {@code PropertyChangeListenerProxy} objects.
   13.44 - *
   13.45 - * @see java.util.EventListenerProxy
   13.46 - * @see PropertyChangeSupport#getPropertyChangeListeners
   13.47 - * @since 1.4
   13.48 - */
   13.49 -public class PropertyChangeListenerProxy
   13.50 -        extends EventListenerProxy<PropertyChangeListener>
   13.51 -        implements PropertyChangeListener {
   13.52 -
   13.53 -    private final String propertyName;
   13.54 -
   13.55 -    /**
   13.56 -     * Constructor which binds the {@code PropertyChangeListener}
   13.57 -     * to a specific property.
   13.58 -     *
   13.59 -     * @param propertyName  the name of the property to listen on
   13.60 -     * @param listener      the listener object
   13.61 -     */
   13.62 -    public PropertyChangeListenerProxy(String propertyName, PropertyChangeListener listener) {
   13.63 -        super(listener);
   13.64 -        this.propertyName = propertyName;
   13.65 -    }
   13.66 -
   13.67 -    /**
   13.68 -     * Forwards the property change event to the listener delegate.
   13.69 -     *
   13.70 -     * @param event  the property change event
   13.71 -     */
   13.72 -    public void propertyChange(PropertyChangeEvent event) {
   13.73 -        getListener().propertyChange(event);
   13.74 -    }
   13.75 -
   13.76 -    /**
   13.77 -     * Returns the name of the named property associated with the listener.
   13.78 -     *
   13.79 -     * @return the name of the named property associated with the listener
   13.80 -     */
   13.81 -    public String getPropertyName() {
   13.82 -        return this.propertyName;
   13.83 -    }
   13.84 -}
    14.1 --- a/emul/compact/src/main/java/java/beans/PropertyChangeSupport.java	Tue Feb 26 14:55:55 2013 +0100
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,536 +0,0 @@
    14.4 -/*
    14.5 - * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved.
    14.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    14.7 - *
    14.8 - * This code is free software; you can redistribute it and/or modify it
    14.9 - * under the terms of the GNU General Public License version 2 only, as
   14.10 - * published by the Free Software Foundation.  Oracle designates this
   14.11 - * particular file as subject to the "Classpath" exception as provided
   14.12 - * by Oracle in the LICENSE file that accompanied this code.
   14.13 - *
   14.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   14.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   14.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   14.17 - * version 2 for more details (a copy is included in the LICENSE file that
   14.18 - * accompanied this code).
   14.19 - *
   14.20 - * You should have received a copy of the GNU General Public License version
   14.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   14.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   14.23 - *
   14.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   14.25 - * or visit www.oracle.com if you need additional information or have any
   14.26 - * questions.
   14.27 - */
   14.28 -package java.beans;
   14.29 -
   14.30 -import java.io.Serializable;
   14.31 -import java.io.ObjectStreamField;
   14.32 -import java.io.ObjectOutputStream;
   14.33 -import java.io.ObjectInputStream;
   14.34 -import java.io.IOException;
   14.35 -import java.util.Hashtable;
   14.36 -import java.util.Map.Entry;
   14.37 -
   14.38 -/**
   14.39 - * This is a utility class that can be used by beans that support bound
   14.40 - * properties.  It manages a list of listeners and dispatches
   14.41 - * {@link PropertyChangeEvent}s to them.  You can use an instance of this class
   14.42 - * as a member field of your bean and delegate these types of work to it.
   14.43 - * The {@link PropertyChangeListener} can be registered for all properties
   14.44 - * or for a property specified by name.
   14.45 - * <p>
   14.46 - * Here is an example of {@code PropertyChangeSupport} usage that follows
   14.47 - * the rules and recommendations laid out in the JavaBeans&trade; specification:
   14.48 - * <pre>
   14.49 - * public class MyBean {
   14.50 - *     private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
   14.51 - *
   14.52 - *     public void addPropertyChangeListener(PropertyChangeListener listener) {
   14.53 - *         this.pcs.addPropertyChangeListener(listener);
   14.54 - *     }
   14.55 - *
   14.56 - *     public void removePropertyChangeListener(PropertyChangeListener listener) {
   14.57 - *         this.pcs.removePropertyChangeListener(listener);
   14.58 - *     }
   14.59 - *
   14.60 - *     private String value;
   14.61 - *
   14.62 - *     public String getValue() {
   14.63 - *         return this.value;
   14.64 - *     }
   14.65 - *
   14.66 - *     public void setValue(String newValue) {
   14.67 - *         String oldValue = this.value;
   14.68 - *         this.value = newValue;
   14.69 - *         this.pcs.firePropertyChange("value", oldValue, newValue);
   14.70 - *     }
   14.71 - *
   14.72 - *     [...]
   14.73 - * }
   14.74 - * </pre>
   14.75 - * <p>
   14.76 - * A {@code PropertyChangeSupport} instance is thread-safe.
   14.77 - * <p>
   14.78 - * This class is serializable.  When it is serialized it will save
   14.79 - * (and restore) any listeners that are themselves serializable.  Any
   14.80 - * non-serializable listeners will be skipped during serialization.
   14.81 - *
   14.82 - * @see VetoableChangeSupport
   14.83 - */
   14.84 -public class PropertyChangeSupport implements Serializable {
   14.85 -    private PropertyChangeListenerMap map = new PropertyChangeListenerMap();
   14.86 -
   14.87 -    /**
   14.88 -     * Constructs a <code>PropertyChangeSupport</code> object.
   14.89 -     *
   14.90 -     * @param sourceBean  The bean to be given as the source for any events.
   14.91 -     */
   14.92 -    public PropertyChangeSupport(Object sourceBean) {
   14.93 -        if (sourceBean == null) {
   14.94 -            throw new NullPointerException();
   14.95 -        }
   14.96 -        source = sourceBean;
   14.97 -    }
   14.98 -
   14.99 -    /**
  14.100 -     * Add a PropertyChangeListener to the listener list.
  14.101 -     * The listener is registered for all properties.
  14.102 -     * The same listener object may be added more than once, and will be called
  14.103 -     * as many times as it is added.
  14.104 -     * If <code>listener</code> is null, no exception is thrown and no action
  14.105 -     * is taken.
  14.106 -     *
  14.107 -     * @param listener  The PropertyChangeListener to be added
  14.108 -     */
  14.109 -    public void addPropertyChangeListener(PropertyChangeListener listener) {
  14.110 -        if (listener == null) {
  14.111 -            return;
  14.112 -        }
  14.113 -        if (listener instanceof PropertyChangeListenerProxy) {
  14.114 -            PropertyChangeListenerProxy proxy =
  14.115 -                   (PropertyChangeListenerProxy)listener;
  14.116 -            // Call two argument add method.
  14.117 -            addPropertyChangeListener(proxy.getPropertyName(),
  14.118 -                                      proxy.getListener());
  14.119 -        } else {
  14.120 -            this.map.add(null, listener);
  14.121 -        }
  14.122 -    }
  14.123 -
  14.124 -    /**
  14.125 -     * Remove a PropertyChangeListener from the listener list.
  14.126 -     * This removes a PropertyChangeListener that was registered
  14.127 -     * for all properties.
  14.128 -     * If <code>listener</code> was added more than once to the same event
  14.129 -     * source, it will be notified one less time after being removed.
  14.130 -     * If <code>listener</code> is null, or was never added, no exception is
  14.131 -     * thrown and no action is taken.
  14.132 -     *
  14.133 -     * @param listener  The PropertyChangeListener to be removed
  14.134 -     */
  14.135 -    public void removePropertyChangeListener(PropertyChangeListener listener) {
  14.136 -        if (listener == null) {
  14.137 -            return;
  14.138 -        }
  14.139 -        if (listener instanceof PropertyChangeListenerProxy) {
  14.140 -            PropertyChangeListenerProxy proxy =
  14.141 -                    (PropertyChangeListenerProxy)listener;
  14.142 -            // Call two argument remove method.
  14.143 -            removePropertyChangeListener(proxy.getPropertyName(),
  14.144 -                                         proxy.getListener());
  14.145 -        } else {
  14.146 -            this.map.remove(null, listener);
  14.147 -        }
  14.148 -    }
  14.149 -
  14.150 -    /**
  14.151 -     * Returns an array of all the listeners that were added to the
  14.152 -     * PropertyChangeSupport object with addPropertyChangeListener().
  14.153 -     * <p>
  14.154 -     * If some listeners have been added with a named property, then
  14.155 -     * the returned array will be a mixture of PropertyChangeListeners
  14.156 -     * and <code>PropertyChangeListenerProxy</code>s. If the calling
  14.157 -     * method is interested in distinguishing the listeners then it must
  14.158 -     * test each element to see if it's a
  14.159 -     * <code>PropertyChangeListenerProxy</code>, perform the cast, and examine
  14.160 -     * the parameter.
  14.161 -     *
  14.162 -     * <pre>
  14.163 -     * PropertyChangeListener[] listeners = bean.getPropertyChangeListeners();
  14.164 -     * for (int i = 0; i < listeners.length; i++) {
  14.165 -     *   if (listeners[i] instanceof PropertyChangeListenerProxy) {
  14.166 -     *     PropertyChangeListenerProxy proxy =
  14.167 -     *                    (PropertyChangeListenerProxy)listeners[i];
  14.168 -     *     if (proxy.getPropertyName().equals("foo")) {
  14.169 -     *       // proxy is a PropertyChangeListener which was associated
  14.170 -     *       // with the property named "foo"
  14.171 -     *     }
  14.172 -     *   }
  14.173 -     * }
  14.174 -     *</pre>
  14.175 -     *
  14.176 -     * @see PropertyChangeListenerProxy
  14.177 -     * @return all of the <code>PropertyChangeListeners</code> added or an
  14.178 -     *         empty array if no listeners have been added
  14.179 -     * @since 1.4
  14.180 -     */
  14.181 -    public PropertyChangeListener[] getPropertyChangeListeners() {
  14.182 -        return this.map.getListeners();
  14.183 -    }
  14.184 -
  14.185 -    /**
  14.186 -     * Add a PropertyChangeListener for a specific property.  The listener
  14.187 -     * will be invoked only when a call on firePropertyChange names that
  14.188 -     * specific property.
  14.189 -     * The same listener object may be added more than once.  For each
  14.190 -     * property,  the listener will be invoked the number of times it was added
  14.191 -     * for that property.
  14.192 -     * If <code>propertyName</code> or <code>listener</code> is null, no
  14.193 -     * exception is thrown and no action is taken.
  14.194 -     *
  14.195 -     * @param propertyName  The name of the property to listen on.
  14.196 -     * @param listener  The PropertyChangeListener to be added
  14.197 -     */
  14.198 -    public void addPropertyChangeListener(
  14.199 -                String propertyName,
  14.200 -                PropertyChangeListener listener) {
  14.201 -        if (listener == null || propertyName == null) {
  14.202 -            return;
  14.203 -        }
  14.204 -        listener = this.map.extract(listener);
  14.205 -        if (listener != null) {
  14.206 -            this.map.add(propertyName, listener);
  14.207 -        }
  14.208 -    }
  14.209 -
  14.210 -    /**
  14.211 -     * Remove a PropertyChangeListener for a specific property.
  14.212 -     * If <code>listener</code> was added more than once to the same event
  14.213 -     * source for the specified property, it will be notified one less time
  14.214 -     * after being removed.
  14.215 -     * If <code>propertyName</code> is null,  no exception is thrown and no
  14.216 -     * action is taken.
  14.217 -     * If <code>listener</code> is null, or was never added for the specified
  14.218 -     * property, no exception is thrown and no action is taken.
  14.219 -     *
  14.220 -     * @param propertyName  The name of the property that was listened on.
  14.221 -     * @param listener  The PropertyChangeListener to be removed
  14.222 -     */
  14.223 -    public void removePropertyChangeListener(
  14.224 -                String propertyName,
  14.225 -                PropertyChangeListener listener) {
  14.226 -        if (listener == null || propertyName == null) {
  14.227 -            return;
  14.228 -        }
  14.229 -        listener = this.map.extract(listener);
  14.230 -        if (listener != null) {
  14.231 -            this.map.remove(propertyName, listener);
  14.232 -        }
  14.233 -    }
  14.234 -
  14.235 -    /**
  14.236 -     * Returns an array of all the listeners which have been associated
  14.237 -     * with the named property.
  14.238 -     *
  14.239 -     * @param propertyName  The name of the property being listened to
  14.240 -     * @return all of the <code>PropertyChangeListeners</code> associated with
  14.241 -     *         the named property.  If no such listeners have been added,
  14.242 -     *         or if <code>propertyName</code> is null, an empty array is
  14.243 -     *         returned.
  14.244 -     * @since 1.4
  14.245 -     */
  14.246 -    public PropertyChangeListener[] getPropertyChangeListeners(String propertyName) {
  14.247 -        return this.map.getListeners(propertyName);
  14.248 -    }
  14.249 -
  14.250 -    /**
  14.251 -     * Reports a bound property update to listeners
  14.252 -     * that have been registered to track updates of
  14.253 -     * all properties or a property with the specified name.
  14.254 -     * <p>
  14.255 -     * No event is fired if old and new values are equal and non-null.
  14.256 -     * <p>
  14.257 -     * This is merely a convenience wrapper around the more general
  14.258 -     * {@link #firePropertyChange(PropertyChangeEvent)} method.
  14.259 -     *
  14.260 -     * @param propertyName  the programmatic name of the property that was changed
  14.261 -     * @param oldValue      the old value of the property
  14.262 -     * @param newValue      the new value of the property
  14.263 -     */
  14.264 -    public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
  14.265 -        if (oldValue == null || newValue == null || !oldValue.equals(newValue)) {
  14.266 -            firePropertyChange(new PropertyChangeEvent(this.source, propertyName, oldValue, newValue));
  14.267 -        }
  14.268 -    }
  14.269 -
  14.270 -    /**
  14.271 -     * Reports an integer bound property update to listeners
  14.272 -     * that have been registered to track updates of
  14.273 -     * all properties or a property with the specified name.
  14.274 -     * <p>
  14.275 -     * No event is fired if old and new values are equal.
  14.276 -     * <p>
  14.277 -     * This is merely a convenience wrapper around the more general
  14.278 -     * {@link #firePropertyChange(String, Object, Object)}  method.
  14.279 -     *
  14.280 -     * @param propertyName  the programmatic name of the property that was changed
  14.281 -     * @param oldValue      the old value of the property
  14.282 -     * @param newValue      the new value of the property
  14.283 -     */
  14.284 -    public void firePropertyChange(String propertyName, int oldValue, int newValue) {
  14.285 -        if (oldValue != newValue) {
  14.286 -            firePropertyChange(propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue));
  14.287 -        }
  14.288 -    }
  14.289 -
  14.290 -    /**
  14.291 -     * Reports a boolean bound property update to listeners
  14.292 -     * that have been registered to track updates of
  14.293 -     * all properties or a property with the specified name.
  14.294 -     * <p>
  14.295 -     * No event is fired if old and new values are equal.
  14.296 -     * <p>
  14.297 -     * This is merely a convenience wrapper around the more general
  14.298 -     * {@link #firePropertyChange(String, Object, Object)}  method.
  14.299 -     *
  14.300 -     * @param propertyName  the programmatic name of the property that was changed
  14.301 -     * @param oldValue      the old value of the property
  14.302 -     * @param newValue      the new value of the property
  14.303 -     */
  14.304 -    public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {
  14.305 -        if (oldValue != newValue) {
  14.306 -            firePropertyChange(propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
  14.307 -        }
  14.308 -    }
  14.309 -
  14.310 -    /**
  14.311 -     * Fires a property change event to listeners
  14.312 -     * that have been registered to track updates of
  14.313 -     * all properties or a property with the specified name.
  14.314 -     * <p>
  14.315 -     * No event is fired if the given event's old and new values are equal and non-null.
  14.316 -     *
  14.317 -     * @param event  the {@code PropertyChangeEvent} to be fired
  14.318 -     */
  14.319 -    public void firePropertyChange(PropertyChangeEvent event) {
  14.320 -        Object oldValue = event.getOldValue();
  14.321 -        Object newValue = event.getNewValue();
  14.322 -        if (oldValue == null || newValue == null || !oldValue.equals(newValue)) {
  14.323 -            String name = event.getPropertyName();
  14.324 -
  14.325 -            PropertyChangeListener[] common = this.map.get(null);
  14.326 -            PropertyChangeListener[] named = (name != null)
  14.327 -                        ? this.map.get(name)
  14.328 -                        : null;
  14.329 -
  14.330 -            fire(common, event);
  14.331 -            fire(named, event);
  14.332 -        }
  14.333 -    }
  14.334 -
  14.335 -    private static void fire(PropertyChangeListener[] listeners, PropertyChangeEvent event) {
  14.336 -        if (listeners != null) {
  14.337 -            for (PropertyChangeListener listener : listeners) {
  14.338 -                listener.propertyChange(event);
  14.339 -            }
  14.340 -        }
  14.341 -    }
  14.342 -
  14.343 -    /**
  14.344 -     * Reports a bound indexed property update to listeners
  14.345 -     * that have been registered to track updates of
  14.346 -     * all properties or a property with the specified name.
  14.347 -     * <p>
  14.348 -     * No event is fired if old and new values are equal and non-null.
  14.349 -     * <p>
  14.350 -     * This is merely a convenience wrapper around the more general
  14.351 -     * {@link #firePropertyChange(PropertyChangeEvent)} method.
  14.352 -     *
  14.353 -     * @param propertyName  the programmatic name of the property that was changed
  14.354 -     * @param index         the index of the property element that was changed
  14.355 -     * @param oldValue      the old value of the property
  14.356 -     * @param newValue      the new value of the property
  14.357 -     * @since 1.5
  14.358 -     */
  14.359 -    public void fireIndexedPropertyChange(String propertyName, int index, Object oldValue, Object newValue) {
  14.360 -        if (oldValue == null || newValue == null || !oldValue.equals(newValue)) {
  14.361 -            firePropertyChange(new IndexedPropertyChangeEvent(source, propertyName, oldValue, newValue, index));
  14.362 -        }
  14.363 -    }
  14.364 -
  14.365 -    /**
  14.366 -     * Reports an integer bound indexed property update to listeners
  14.367 -     * that have been registered to track updates of
  14.368 -     * all properties or a property with the specified name.
  14.369 -     * <p>
  14.370 -     * No event is fired if old and new values are equal.
  14.371 -     * <p>
  14.372 -     * This is merely a convenience wrapper around the more general
  14.373 -     * {@link #fireIndexedPropertyChange(String, int, Object, Object)} method.
  14.374 -     *
  14.375 -     * @param propertyName  the programmatic name of the property that was changed
  14.376 -     * @param index         the index of the property element that was changed
  14.377 -     * @param oldValue      the old value of the property
  14.378 -     * @param newValue      the new value of the property
  14.379 -     * @since 1.5
  14.380 -     */
  14.381 -    public void fireIndexedPropertyChange(String propertyName, int index, int oldValue, int newValue) {
  14.382 -        if (oldValue != newValue) {
  14.383 -            fireIndexedPropertyChange(propertyName, index, Integer.valueOf(oldValue), Integer.valueOf(newValue));
  14.384 -        }
  14.385 -    }
  14.386 -
  14.387 -    /**
  14.388 -     * Reports a boolean bound indexed property update to listeners
  14.389 -     * that have been registered to track updates of
  14.390 -     * all properties or a property with the specified name.
  14.391 -     * <p>
  14.392 -     * No event is fired if old and new values are equal.
  14.393 -     * <p>
  14.394 -     * This is merely a convenience wrapper around the more general
  14.395 -     * {@link #fireIndexedPropertyChange(String, int, Object, Object)} method.
  14.396 -     *
  14.397 -     * @param propertyName  the programmatic name of the property that was changed
  14.398 -     * @param index         the index of the property element that was changed
  14.399 -     * @param oldValue      the old value of the property
  14.400 -     * @param newValue      the new value of the property
  14.401 -     * @since 1.5
  14.402 -     */
  14.403 -    public void fireIndexedPropertyChange(String propertyName, int index, boolean oldValue, boolean newValue) {
  14.404 -        if (oldValue != newValue) {
  14.405 -            fireIndexedPropertyChange(propertyName, index, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
  14.406 -        }
  14.407 -    }
  14.408 -
  14.409 -    /**
  14.410 -     * Check if there are any listeners for a specific property, including
  14.411 -     * those registered on all properties.  If <code>propertyName</code>
  14.412 -     * is null, only check for listeners registered on all properties.
  14.413 -     *
  14.414 -     * @param propertyName  the property name.
  14.415 -     * @return true if there are one or more listeners for the given property
  14.416 -     */
  14.417 -    public boolean hasListeners(String propertyName) {
  14.418 -        return this.map.hasListeners(propertyName);
  14.419 -    }
  14.420 -
  14.421 -    /**
  14.422 -     * @serialData Null terminated list of <code>PropertyChangeListeners</code>.
  14.423 -     * <p>
  14.424 -     * At serialization time we skip non-serializable listeners and
  14.425 -     * only serialize the serializable listeners.
  14.426 -     */
  14.427 -    private void writeObject(ObjectOutputStream s) throws IOException {
  14.428 -        Hashtable<String, PropertyChangeSupport> children = null;
  14.429 -        PropertyChangeListener[] listeners = null;
  14.430 -        synchronized (this.map) {
  14.431 -            for (Entry<String, PropertyChangeListener[]> entry : this.map.getEntries()) {
  14.432 -                String property = entry.getKey();
  14.433 -                if (property == null) {
  14.434 -                    listeners = entry.getValue();
  14.435 -                } else {
  14.436 -                    if (children == null) {
  14.437 -                        children = new Hashtable<String, PropertyChangeSupport>();
  14.438 -                    }
  14.439 -                    PropertyChangeSupport pcs = new PropertyChangeSupport(this.source);
  14.440 -                    pcs.map.set(null, entry.getValue());
  14.441 -                    children.put(property, pcs);
  14.442 -                }
  14.443 -            }
  14.444 -        }
  14.445 -        ObjectOutputStream.PutField fields = s.putFields();
  14.446 -        fields.put("children", children);
  14.447 -        fields.put("source", this.source);
  14.448 -        fields.put("propertyChangeSupportSerializedDataVersion", 2);
  14.449 -        s.writeFields();
  14.450 -
  14.451 -        if (listeners != null) {
  14.452 -            for (PropertyChangeListener l : listeners) {
  14.453 -                if (l instanceof Serializable) {
  14.454 -                    s.writeObject(l);
  14.455 -                }
  14.456 -            }
  14.457 -        }
  14.458 -        s.writeObject(null);
  14.459 -    }
  14.460 -
  14.461 -    private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {
  14.462 -        this.map = new PropertyChangeListenerMap();
  14.463 -
  14.464 -        ObjectInputStream.GetField fields = s.readFields();
  14.465 -
  14.466 -        Hashtable<String, PropertyChangeSupport> children = (Hashtable<String, PropertyChangeSupport>) fields.get("children", null);
  14.467 -        this.source = fields.get("source", null);
  14.468 -        fields.get("propertyChangeSupportSerializedDataVersion", 2);
  14.469 -
  14.470 -        Object listenerOrNull;
  14.471 -        while (null != (listenerOrNull = s.readObject())) {
  14.472 -            this.map.add(null, (PropertyChangeListener)listenerOrNull);
  14.473 -        }
  14.474 -        if (children != null) {
  14.475 -            for (Entry<String, PropertyChangeSupport> entry : children.entrySet()) {
  14.476 -                for (PropertyChangeListener listener : entry.getValue().getPropertyChangeListeners()) {
  14.477 -                    this.map.add(entry.getKey(), listener);
  14.478 -                }
  14.479 -            }
  14.480 -        }
  14.481 -    }
  14.482 -
  14.483 -    /**
  14.484 -     * The object to be provided as the "source" for any generated events.
  14.485 -     */
  14.486 -    private Object source;
  14.487 -
  14.488 -    /**
  14.489 -     * @serialField children                                   Hashtable
  14.490 -     * @serialField source                                     Object
  14.491 -     * @serialField propertyChangeSupportSerializedDataVersion int
  14.492 -     */
  14.493 -    private static final ObjectStreamField[] serialPersistentFields = {
  14.494 -            new ObjectStreamField("children", Hashtable.class),
  14.495 -            new ObjectStreamField("source", Object.class),
  14.496 -            new ObjectStreamField("propertyChangeSupportSerializedDataVersion", Integer.TYPE)
  14.497 -    };
  14.498 -
  14.499 -    /**
  14.500 -     * Serialization version ID, so we're compatible with JDK 1.1
  14.501 -     */
  14.502 -    static final long serialVersionUID = 6401253773779951803L;
  14.503 -
  14.504 -    /**
  14.505 -     * This is a {@link ChangeListenerMap ChangeListenerMap} implementation
  14.506 -     * that works with {@link PropertyChangeListener PropertyChangeListener} objects.
  14.507 -     */
  14.508 -    private static final class PropertyChangeListenerMap extends ChangeListenerMap<PropertyChangeListener> {
  14.509 -        private static final PropertyChangeListener[] EMPTY = {};
  14.510 -
  14.511 -        /**
  14.512 -         * Creates an array of {@link PropertyChangeListener PropertyChangeListener} objects.
  14.513 -         * This method uses the same instance of the empty array
  14.514 -         * when {@code length} equals {@code 0}.
  14.515 -         *
  14.516 -         * @param length  the array length
  14.517 -         * @return        an array with specified length
  14.518 -         */
  14.519 -        @Override
  14.520 -        protected PropertyChangeListener[] newArray(int length) {
  14.521 -            return (0 < length)
  14.522 -                    ? new PropertyChangeListener[length]
  14.523 -                    : EMPTY;
  14.524 -        }
  14.525 -
  14.526 -        /**
  14.527 -         * Creates a {@link PropertyChangeListenerProxy PropertyChangeListenerProxy}
  14.528 -         * object for the specified property.
  14.529 -         *
  14.530 -         * @param name      the name of the property to listen on
  14.531 -         * @param listener  the listener to process events
  14.532 -         * @return          a {@code PropertyChangeListenerProxy} object
  14.533 -         */
  14.534 -        @Override
  14.535 -        protected PropertyChangeListener newProxy(String name, PropertyChangeListener listener) {
  14.536 -            return new PropertyChangeListenerProxy(name, listener);
  14.537 -        }
  14.538 -    }
  14.539 -}
    15.1 --- a/emul/compact/src/main/java/java/beans/PropertyVetoException.java	Tue Feb 26 14:55:55 2013 +0100
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,64 +0,0 @@
    15.4 -/*
    15.5 - * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
    15.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    15.7 - *
    15.8 - * This code is free software; you can redistribute it and/or modify it
    15.9 - * under the terms of the GNU General Public License version 2 only, as
   15.10 - * published by the Free Software Foundation.  Oracle designates this
   15.11 - * particular file as subject to the "Classpath" exception as provided
   15.12 - * by Oracle in the LICENSE file that accompanied this code.
   15.13 - *
   15.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   15.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   15.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   15.17 - * version 2 for more details (a copy is included in the LICENSE file that
   15.18 - * accompanied this code).
   15.19 - *
   15.20 - * You should have received a copy of the GNU General Public License version
   15.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   15.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   15.23 - *
   15.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   15.25 - * or visit www.oracle.com if you need additional information or have any
   15.26 - * questions.
   15.27 - */
   15.28 -
   15.29 -package java.beans;
   15.30 -
   15.31 -
   15.32 -/**
   15.33 - * A PropertyVetoException is thrown when a proposed change to a
   15.34 - * property represents an unacceptable value.
   15.35 - */
   15.36 -
   15.37 -public
   15.38 -class PropertyVetoException extends Exception {
   15.39 -    private static final long serialVersionUID = 129596057694162164L;
   15.40 -
   15.41 -    /**
   15.42 -     * Constructs a <code>PropertyVetoException</code> with a
   15.43 -     * detailed message.
   15.44 -     *
   15.45 -     * @param mess Descriptive message
   15.46 -     * @param evt A PropertyChangeEvent describing the vetoed change.
   15.47 -     */
   15.48 -    public PropertyVetoException(String mess, PropertyChangeEvent evt) {
   15.49 -        super(mess);
   15.50 -        this.evt = evt;
   15.51 -    }
   15.52 -
   15.53 -     /**
   15.54 -     * Gets the vetoed <code>PropertyChangeEvent</code>.
   15.55 -     *
   15.56 -     * @return A PropertyChangeEvent describing the vetoed change.
   15.57 -     */
   15.58 -    public PropertyChangeEvent getPropertyChangeEvent() {
   15.59 -        return evt;
   15.60 -    }
   15.61 -
   15.62 -    /**
   15.63 -     * A PropertyChangeEvent describing the vetoed change.
   15.64 -     * @serial
   15.65 -     */
   15.66 -    private PropertyChangeEvent evt;
   15.67 -}
    16.1 --- a/emul/compact/src/main/java/java/beans/VetoableChangeListener.java	Tue Feb 26 14:55:55 2013 +0100
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,44 +0,0 @@
    16.4 -/*
    16.5 - * Copyright (c) 1996, 1997, Oracle and/or its affiliates. All rights reserved.
    16.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    16.7 - *
    16.8 - * This code is free software; you can redistribute it and/or modify it
    16.9 - * under the terms of the GNU General Public License version 2 only, as
   16.10 - * published by the Free Software Foundation.  Oracle designates this
   16.11 - * particular file as subject to the "Classpath" exception as provided
   16.12 - * by Oracle in the LICENSE file that accompanied this code.
   16.13 - *
   16.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   16.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   16.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   16.17 - * version 2 for more details (a copy is included in the LICENSE file that
   16.18 - * accompanied this code).
   16.19 - *
   16.20 - * You should have received a copy of the GNU General Public License version
   16.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   16.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   16.23 - *
   16.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   16.25 - * or visit www.oracle.com if you need additional information or have any
   16.26 - * questions.
   16.27 - */
   16.28 -
   16.29 -package java.beans;
   16.30 -
   16.31 -/**
   16.32 - * A VetoableChange event gets fired whenever a bean changes a "constrained"
   16.33 - * property.  You can register a VetoableChangeListener with a source bean
   16.34 - * so as to be notified of any constrained property updates.
   16.35 - */
   16.36 -public interface VetoableChangeListener extends java.util.EventListener {
   16.37 -    /**
   16.38 -     * This method gets called when a constrained property is changed.
   16.39 -     *
   16.40 -     * @param     evt a <code>PropertyChangeEvent</code> object describing the
   16.41 -     *                event source and the property that has changed.
   16.42 -     * @exception PropertyVetoException if the recipient wishes the property
   16.43 -     *              change to be rolled back.
   16.44 -     */
   16.45 -    void vetoableChange(PropertyChangeEvent evt)
   16.46 -                                throws PropertyVetoException;
   16.47 -}
    17.1 --- a/emul/compact/src/main/java/java/beans/VetoableChangeListenerProxy.java	Tue Feb 26 14:55:55 2013 +0100
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,84 +0,0 @@
    17.4 -/*
    17.5 - * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
    17.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    17.7 - *
    17.8 - * This code is free software; you can redistribute it and/or modify it
    17.9 - * under the terms of the GNU General Public License version 2 only, as
   17.10 - * published by the Free Software Foundation.  Oracle designates this
   17.11 - * particular file as subject to the "Classpath" exception as provided
   17.12 - * by Oracle in the LICENSE file that accompanied this code.
   17.13 - *
   17.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   17.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   17.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   17.17 - * version 2 for more details (a copy is included in the LICENSE file that
   17.18 - * accompanied this code).
   17.19 - *
   17.20 - * You should have received a copy of the GNU General Public License version
   17.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   17.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   17.23 - *
   17.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   17.25 - * or visit www.oracle.com if you need additional information or have any
   17.26 - * questions.
   17.27 - */
   17.28 -
   17.29 -package java.beans;
   17.30 -
   17.31 -import java.util.EventListenerProxy;
   17.32 -
   17.33 -/**
   17.34 - * A class which extends the {@code EventListenerProxy}
   17.35 - * specifically for adding a {@code VetoableChangeListener}
   17.36 - * with a "constrained" property.
   17.37 - * Instances of this class can be added
   17.38 - * as {@code VetoableChangeListener}s to a bean
   17.39 - * which supports firing vetoable change events.
   17.40 - * <p>
   17.41 - * If the object has a {@code getVetoableChangeListeners} method
   17.42 - * then the array returned could be a mixture of {@code VetoableChangeListener}
   17.43 - * and {@code VetoableChangeListenerProxy} objects.
   17.44 - *
   17.45 - * @see java.util.EventListenerProxy
   17.46 - * @see VetoableChangeSupport#getVetoableChangeListeners
   17.47 - * @since 1.4
   17.48 - */
   17.49 -public class VetoableChangeListenerProxy
   17.50 -        extends EventListenerProxy<VetoableChangeListener>
   17.51 -        implements VetoableChangeListener {
   17.52 -
   17.53 -    private final String propertyName;
   17.54 -
   17.55 -    /**
   17.56 -     * Constructor which binds the {@code VetoableChangeListener}
   17.57 -     * to a specific property.
   17.58 -     *
   17.59 -     * @param propertyName  the name of the property to listen on
   17.60 -     * @param listener      the listener object
   17.61 -     */
   17.62 -    public VetoableChangeListenerProxy(String propertyName, VetoableChangeListener listener) {
   17.63 -        super(listener);
   17.64 -        this.propertyName = propertyName;
   17.65 -    }
   17.66 -
   17.67 -    /**
   17.68 -    * Forwards the property change event to the listener delegate.
   17.69 -    *
   17.70 -    * @param event  the property change event
   17.71 -    *
   17.72 -    * @exception PropertyVetoException if the recipient wishes the property
   17.73 -    *                                  change to be rolled back
   17.74 -    */
   17.75 -    public void vetoableChange(PropertyChangeEvent event) throws PropertyVetoException{
   17.76 -        getListener().vetoableChange(event);
   17.77 -    }
   17.78 -
   17.79 -    /**
   17.80 -     * Returns the name of the named property associated with the listener.
   17.81 -     *
   17.82 -     * @return the name of the named property associated with the listener
   17.83 -     */
   17.84 -    public String getPropertyName() {
   17.85 -        return this.propertyName;
   17.86 -    }
   17.87 -}
    18.1 --- a/emul/compact/src/main/java/java/beans/VetoableChangeSupport.java	Tue Feb 26 14:55:55 2013 +0100
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,526 +0,0 @@
    18.4 -/*
    18.5 - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
    18.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    18.7 - *
    18.8 - * This code is free software; you can redistribute it and/or modify it
    18.9 - * under the terms of the GNU General Public License version 2 only, as
   18.10 - * published by the Free Software Foundation.  Oracle designates this
   18.11 - * particular file as subject to the "Classpath" exception as provided
   18.12 - * by Oracle in the LICENSE file that accompanied this code.
   18.13 - *
   18.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   18.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   18.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   18.17 - * version 2 for more details (a copy is included in the LICENSE file that
   18.18 - * accompanied this code).
   18.19 - *
   18.20 - * You should have received a copy of the GNU General Public License version
   18.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   18.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   18.23 - *
   18.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   18.25 - * or visit www.oracle.com if you need additional information or have any
   18.26 - * questions.
   18.27 - */
   18.28 -package java.beans;
   18.29 -
   18.30 -import java.io.Serializable;
   18.31 -import java.io.ObjectStreamField;
   18.32 -import java.io.ObjectOutputStream;
   18.33 -import java.io.ObjectInputStream;
   18.34 -import java.io.IOException;
   18.35 -import java.util.Hashtable;
   18.36 -import java.util.Map.Entry;
   18.37 -import org.apidesign.bck2brwsr.emul.lang.System;
   18.38 -
   18.39 -/**
   18.40 - * This is a utility class that can be used by beans that support constrained
   18.41 - * properties.  It manages a list of listeners and dispatches
   18.42 - * {@link PropertyChangeEvent}s to them.  You can use an instance of this class
   18.43 - * as a member field of your bean and delegate these types of work to it.
   18.44 - * The {@link VetoableChangeListener} can be registered for all properties
   18.45 - * or for a property specified by name.
   18.46 - * <p>
   18.47 - * Here is an example of {@code VetoableChangeSupport} usage that follows
   18.48 - * the rules and recommendations laid out in the JavaBeans&trade; specification:
   18.49 - * <pre>
   18.50 - * public class MyBean {
   18.51 - *     private final VetoableChangeSupport vcs = new VetoableChangeSupport(this);
   18.52 - *
   18.53 - *     public void addVetoableChangeListener(VetoableChangeListener listener) {
   18.54 - *         this.vcs.addVetoableChangeListener(listener);
   18.55 - *     }
   18.56 - *
   18.57 - *     public void removeVetoableChangeListener(VetoableChangeListener listener) {
   18.58 - *         this.vcs.removeVetoableChangeListener(listener);
   18.59 - *     }
   18.60 - *
   18.61 - *     private String value;
   18.62 - *
   18.63 - *     public String getValue() {
   18.64 - *         return this.value;
   18.65 - *     }
   18.66 - *
   18.67 - *     public void setValue(String newValue) throws PropertyVetoException {
   18.68 - *         String oldValue = this.value;
   18.69 - *         this.vcs.fireVetoableChange("value", oldValue, newValue);
   18.70 - *         this.value = newValue;
   18.71 - *     }
   18.72 - *
   18.73 - *     [...]
   18.74 - * }
   18.75 - * </pre>
   18.76 - * <p>
   18.77 - * A {@code VetoableChangeSupport} instance is thread-safe.
   18.78 - * <p>
   18.79 - * This class is serializable.  When it is serialized it will save
   18.80 - * (and restore) any listeners that are themselves serializable.  Any
   18.81 - * non-serializable listeners will be skipped during serialization.
   18.82 - *
   18.83 - * @see PropertyChangeSupport
   18.84 - */
   18.85 -public class VetoableChangeSupport implements Serializable {
   18.86 -    private VetoableChangeListenerMap map = new VetoableChangeListenerMap();
   18.87 -
   18.88 -    /**
   18.89 -     * Constructs a <code>VetoableChangeSupport</code> object.
   18.90 -     *
   18.91 -     * @param sourceBean  The bean to be given as the source for any events.
   18.92 -     */
   18.93 -    public VetoableChangeSupport(Object sourceBean) {
   18.94 -        if (sourceBean == null) {
   18.95 -            throw new NullPointerException();
   18.96 -        }
   18.97 -        source = sourceBean;
   18.98 -    }
   18.99 -
  18.100 -    /**
  18.101 -     * Add a VetoableChangeListener to the listener list.
  18.102 -     * The listener is registered for all properties.
  18.103 -     * The same listener object may be added more than once, and will be called
  18.104 -     * as many times as it is added.
  18.105 -     * If <code>listener</code> is null, no exception is thrown and no action
  18.106 -     * is taken.
  18.107 -     *
  18.108 -     * @param listener  The VetoableChangeListener to be added
  18.109 -     */
  18.110 -    public void addVetoableChangeListener(VetoableChangeListener listener) {
  18.111 -        if (listener == null) {
  18.112 -            return;
  18.113 -        }
  18.114 -        if (listener instanceof VetoableChangeListenerProxy) {
  18.115 -            VetoableChangeListenerProxy proxy =
  18.116 -                    (VetoableChangeListenerProxy)listener;
  18.117 -            // Call two argument add method.
  18.118 -            addVetoableChangeListener(proxy.getPropertyName(),
  18.119 -                                      proxy.getListener());
  18.120 -        } else {
  18.121 -            this.map.add(null, listener);
  18.122 -        }
  18.123 -    }
  18.124 -
  18.125 -    /**
  18.126 -     * Remove a VetoableChangeListener from the listener list.
  18.127 -     * This removes a VetoableChangeListener that was registered
  18.128 -     * for all properties.
  18.129 -     * If <code>listener</code> was added more than once to the same event
  18.130 -     * source, it will be notified one less time after being removed.
  18.131 -     * If <code>listener</code> is null, or was never added, no exception is
  18.132 -     * thrown and no action is taken.
  18.133 -     *
  18.134 -     * @param listener  The VetoableChangeListener to be removed
  18.135 -     */
  18.136 -    public void removeVetoableChangeListener(VetoableChangeListener listener) {
  18.137 -        if (listener == null) {
  18.138 -            return;
  18.139 -        }
  18.140 -        if (listener instanceof VetoableChangeListenerProxy) {
  18.141 -            VetoableChangeListenerProxy proxy =
  18.142 -                    (VetoableChangeListenerProxy)listener;
  18.143 -            // Call two argument remove method.
  18.144 -            removeVetoableChangeListener(proxy.getPropertyName(),
  18.145 -                                         proxy.getListener());
  18.146 -        } else {
  18.147 -            this.map.remove(null, listener);
  18.148 -        }
  18.149 -    }
  18.150 -
  18.151 -    /**
  18.152 -     * Returns an array of all the listeners that were added to the
  18.153 -     * VetoableChangeSupport object with addVetoableChangeListener().
  18.154 -     * <p>
  18.155 -     * If some listeners have been added with a named property, then
  18.156 -     * the returned array will be a mixture of VetoableChangeListeners
  18.157 -     * and <code>VetoableChangeListenerProxy</code>s. If the calling
  18.158 -     * method is interested in distinguishing the listeners then it must
  18.159 -     * test each element to see if it's a
  18.160 -     * <code>VetoableChangeListenerProxy</code>, perform the cast, and examine
  18.161 -     * the parameter.
  18.162 -     *
  18.163 -     * <pre>
  18.164 -     * VetoableChangeListener[] listeners = bean.getVetoableChangeListeners();
  18.165 -     * for (int i = 0; i < listeners.length; i++) {
  18.166 -     *        if (listeners[i] instanceof VetoableChangeListenerProxy) {
  18.167 -     *     VetoableChangeListenerProxy proxy =
  18.168 -     *                    (VetoableChangeListenerProxy)listeners[i];
  18.169 -     *     if (proxy.getPropertyName().equals("foo")) {
  18.170 -     *       // proxy is a VetoableChangeListener which was associated
  18.171 -     *       // with the property named "foo"
  18.172 -     *     }
  18.173 -     *   }
  18.174 -     * }
  18.175 -     *</pre>
  18.176 -     *
  18.177 -     * @see VetoableChangeListenerProxy
  18.178 -     * @return all of the <code>VetoableChangeListeners</code> added or an
  18.179 -     *         empty array if no listeners have been added
  18.180 -     * @since 1.4
  18.181 -     */
  18.182 -    public VetoableChangeListener[] getVetoableChangeListeners(){
  18.183 -        return this.map.getListeners();
  18.184 -    }
  18.185 -
  18.186 -    /**
  18.187 -     * Add a VetoableChangeListener for a specific property.  The listener
  18.188 -     * will be invoked only when a call on fireVetoableChange names that
  18.189 -     * specific property.
  18.190 -     * The same listener object may be added more than once.  For each
  18.191 -     * property,  the listener will be invoked the number of times it was added
  18.192 -     * for that property.
  18.193 -     * If <code>propertyName</code> or <code>listener</code> is null, no
  18.194 -     * exception is thrown and no action is taken.
  18.195 -     *
  18.196 -     * @param propertyName  The name of the property to listen on.
  18.197 -     * @param listener  The VetoableChangeListener to be added
  18.198 -     */
  18.199 -    public void addVetoableChangeListener(
  18.200 -                                String propertyName,
  18.201 -                VetoableChangeListener listener) {
  18.202 -        if (listener == null || propertyName == null) {
  18.203 -            return;
  18.204 -        }
  18.205 -        listener = this.map.extract(listener);
  18.206 -        if (listener != null) {
  18.207 -            this.map.add(propertyName, listener);
  18.208 -        }
  18.209 -    }
  18.210 -
  18.211 -    /**
  18.212 -     * Remove a VetoableChangeListener for a specific property.
  18.213 -     * If <code>listener</code> was added more than once to the same event
  18.214 -     * source for the specified property, it will be notified one less time
  18.215 -     * after being removed.
  18.216 -     * If <code>propertyName</code> is null, no exception is thrown and no
  18.217 -     * action is taken.
  18.218 -     * If <code>listener</code> is null, or was never added for the specified
  18.219 -     * property, no exception is thrown and no action is taken.
  18.220 -     *
  18.221 -     * @param propertyName  The name of the property that was listened on.
  18.222 -     * @param listener  The VetoableChangeListener to be removed
  18.223 -     */
  18.224 -    public void removeVetoableChangeListener(
  18.225 -                                String propertyName,
  18.226 -                VetoableChangeListener listener) {
  18.227 -        if (listener == null || propertyName == null) {
  18.228 -            return;
  18.229 -        }
  18.230 -        listener = this.map.extract(listener);
  18.231 -        if (listener != null) {
  18.232 -            this.map.remove(propertyName, listener);
  18.233 -        }
  18.234 -    }
  18.235 -
  18.236 -    /**
  18.237 -     * Returns an array of all the listeners which have been associated
  18.238 -     * with the named property.
  18.239 -     *
  18.240 -     * @param propertyName  The name of the property being listened to
  18.241 -     * @return all the <code>VetoableChangeListeners</code> associated with
  18.242 -     *         the named property.  If no such listeners have been added,
  18.243 -     *         or if <code>propertyName</code> is null, an empty array is
  18.244 -     *         returned.
  18.245 -     * @since 1.4
  18.246 -     */
  18.247 -    public VetoableChangeListener[] getVetoableChangeListeners(String propertyName) {
  18.248 -        return this.map.getListeners(propertyName);
  18.249 -    }
  18.250 -
  18.251 -    /**
  18.252 -     * Reports a constrained property update to listeners
  18.253 -     * that have been registered to track updates of
  18.254 -     * all properties or a property with the specified name.
  18.255 -     * <p>
  18.256 -     * Any listener can throw a {@code PropertyVetoException} to veto the update.
  18.257 -     * If one of the listeners vetoes the update, this method passes
  18.258 -     * a new "undo" {@code PropertyChangeEvent} that reverts to the old value
  18.259 -     * to all listeners that already confirmed this update
  18.260 -     * and throws the {@code PropertyVetoException} again.
  18.261 -     * <p>
  18.262 -     * No event is fired if old and new values are equal and non-null.
  18.263 -     * <p>
  18.264 -     * This is merely a convenience wrapper around the more general
  18.265 -     * {@link #fireVetoableChange(PropertyChangeEvent)} method.
  18.266 -     *
  18.267 -     * @param propertyName  the programmatic name of the property that is about to change
  18.268 -     * @param oldValue      the old value of the property
  18.269 -     * @param newValue      the new value of the property
  18.270 -     * @throws PropertyVetoException if one of listeners vetoes the property update
  18.271 -     */
  18.272 -    public void fireVetoableChange(String propertyName, Object oldValue, Object newValue)
  18.273 -            throws PropertyVetoException {
  18.274 -        if (oldValue == null || newValue == null || !oldValue.equals(newValue)) {
  18.275 -            fireVetoableChange(new PropertyChangeEvent(this.source, propertyName, oldValue, newValue));
  18.276 -        }
  18.277 -    }
  18.278 -
  18.279 -    /**
  18.280 -     * Reports an integer constrained property update to listeners
  18.281 -     * that have been registered to track updates of
  18.282 -     * all properties or a property with the specified name.
  18.283 -     * <p>
  18.284 -     * Any listener can throw a {@code PropertyVetoException} to veto the update.
  18.285 -     * If one of the listeners vetoes the update, this method passes
  18.286 -     * a new "undo" {@code PropertyChangeEvent} that reverts to the old value
  18.287 -     * to all listeners that already confirmed this update
  18.288 -     * and throws the {@code PropertyVetoException} again.
  18.289 -     * <p>
  18.290 -     * No event is fired if old and new values are equal.
  18.291 -     * <p>
  18.292 -     * This is merely a convenience wrapper around the more general
  18.293 -     * {@link #fireVetoableChange(String, Object, Object)} method.
  18.294 -     *
  18.295 -     * @param propertyName  the programmatic name of the property that is about to change
  18.296 -     * @param oldValue      the old value of the property
  18.297 -     * @param newValue      the new value of the property
  18.298 -     * @throws PropertyVetoException if one of listeners vetoes the property update
  18.299 -     */
  18.300 -    public void fireVetoableChange(String propertyName, int oldValue, int newValue)
  18.301 -            throws PropertyVetoException {
  18.302 -        if (oldValue != newValue) {
  18.303 -            fireVetoableChange(propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue));
  18.304 -        }
  18.305 -    }
  18.306 -
  18.307 -    /**
  18.308 -     * Reports a boolean constrained property update to listeners
  18.309 -     * that have been registered to track updates of
  18.310 -     * all properties or a property with the specified name.
  18.311 -     * <p>
  18.312 -     * Any listener can throw a {@code PropertyVetoException} to veto the update.
  18.313 -     * If one of the listeners vetoes the update, this method passes
  18.314 -     * a new "undo" {@code PropertyChangeEvent} that reverts to the old value
  18.315 -     * to all listeners that already confirmed this update
  18.316 -     * and throws the {@code PropertyVetoException} again.
  18.317 -     * <p>
  18.318 -     * No event is fired if old and new values are equal.
  18.319 -     * <p>
  18.320 -     * This is merely a convenience wrapper around the more general
  18.321 -     * {@link #fireVetoableChange(String, Object, Object)} method.
  18.322 -     *
  18.323 -     * @param propertyName  the programmatic name of the property that is about to change
  18.324 -     * @param oldValue      the old value of the property
  18.325 -     * @param newValue      the new value of the property
  18.326 -     * @throws PropertyVetoException if one of listeners vetoes the property update
  18.327 -     */
  18.328 -    public void fireVetoableChange(String propertyName, boolean oldValue, boolean newValue)
  18.329 -            throws PropertyVetoException {
  18.330 -        if (oldValue != newValue) {
  18.331 -            fireVetoableChange(propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
  18.332 -        }
  18.333 -    }
  18.334 -
  18.335 -    /**
  18.336 -     * Fires a property change event to listeners
  18.337 -     * that have been registered to track updates of
  18.338 -     * all properties or a property with the specified name.
  18.339 -     * <p>
  18.340 -     * Any listener can throw a {@code PropertyVetoException} to veto the update.
  18.341 -     * If one of the listeners vetoes the update, this method passes
  18.342 -     * a new "undo" {@code PropertyChangeEvent} that reverts to the old value
  18.343 -     * to all listeners that already confirmed this update
  18.344 -     * and throws the {@code PropertyVetoException} again.
  18.345 -     * <p>
  18.346 -     * No event is fired if the given event's old and new values are equal and non-null.
  18.347 -     *
  18.348 -     * @param event  the {@code PropertyChangeEvent} to be fired
  18.349 -     * @throws PropertyVetoException if one of listeners vetoes the property update
  18.350 -     */
  18.351 -    public void fireVetoableChange(PropertyChangeEvent event)
  18.352 -            throws PropertyVetoException {
  18.353 -        Object oldValue = event.getOldValue();
  18.354 -        Object newValue = event.getNewValue();
  18.355 -        if (oldValue == null || newValue == null || !oldValue.equals(newValue)) {
  18.356 -            String name = event.getPropertyName();
  18.357 -
  18.358 -            VetoableChangeListener[] common = this.map.get(null);
  18.359 -            VetoableChangeListener[] named = (name != null)
  18.360 -                        ? this.map.get(name)
  18.361 -                        : null;
  18.362 -
  18.363 -            VetoableChangeListener[] listeners;
  18.364 -            if (common == null) {
  18.365 -                listeners = named;
  18.366 -            }
  18.367 -            else if (named == null) {
  18.368 -                listeners = common;
  18.369 -            }
  18.370 -            else {
  18.371 -                listeners = new VetoableChangeListener[common.length + named.length];
  18.372 -                System.arraycopy(common, 0, listeners, 0, common.length);
  18.373 -                System.arraycopy(named, 0, listeners, common.length, named.length);
  18.374 -            }
  18.375 -            if (listeners != null) {
  18.376 -                int current = 0;
  18.377 -                try {
  18.378 -                    while (current < listeners.length) {
  18.379 -                        listeners[current].vetoableChange(event);
  18.380 -                        current++;
  18.381 -                    }
  18.382 -                }
  18.383 -                catch (PropertyVetoException veto) {
  18.384 -                    event = new PropertyChangeEvent(this.source, name, newValue, oldValue);
  18.385 -                    for (int i = 0; i < current; i++) {
  18.386 -                        try {
  18.387 -                            listeners[i].vetoableChange(event);
  18.388 -                        }
  18.389 -                        catch (PropertyVetoException exception) {
  18.390 -                            // ignore exceptions that occur during rolling back
  18.391 -                        }
  18.392 -                    }
  18.393 -                    throw veto; // rethrow the veto exception
  18.394 -                }
  18.395 -            }
  18.396 -        }
  18.397 -    }
  18.398 -
  18.399 -    /**
  18.400 -     * Check if there are any listeners for a specific property, including
  18.401 -     * those registered on all properties.  If <code>propertyName</code>
  18.402 -     * is null, only check for listeners registered on all properties.
  18.403 -     *
  18.404 -     * @param propertyName  the property name.
  18.405 -     * @return true if there are one or more listeners for the given property
  18.406 -     */
  18.407 -    public boolean hasListeners(String propertyName) {
  18.408 -        return this.map.hasListeners(propertyName);
  18.409 -    }
  18.410 -
  18.411 -    /**
  18.412 -     * @serialData Null terminated list of <code>VetoableChangeListeners</code>.
  18.413 -     * <p>
  18.414 -     * At serialization time we skip non-serializable listeners and
  18.415 -     * only serialize the serializable listeners.
  18.416 -     */
  18.417 -    private void writeObject(ObjectOutputStream s) throws IOException {
  18.418 -        Hashtable<String, VetoableChangeSupport> children = null;
  18.419 -        VetoableChangeListener[] listeners = null;
  18.420 -        synchronized (this.map) {
  18.421 -            for (Entry<String, VetoableChangeListener[]> entry : this.map.getEntries()) {
  18.422 -                String property = entry.getKey();
  18.423 -                if (property == null) {
  18.424 -                    listeners = entry.getValue();
  18.425 -                } else {
  18.426 -                    if (children == null) {
  18.427 -                        children = new Hashtable<String, VetoableChangeSupport>();
  18.428 -                    }
  18.429 -                    VetoableChangeSupport vcs = new VetoableChangeSupport(this.source);
  18.430 -                    vcs.map.set(null, entry.getValue());
  18.431 -                    children.put(property, vcs);
  18.432 -                }
  18.433 -            }
  18.434 -        }
  18.435 -        ObjectOutputStream.PutField fields = s.putFields();
  18.436 -        fields.put("children", children);
  18.437 -        fields.put("source", this.source);
  18.438 -        fields.put("vetoableChangeSupportSerializedDataVersion", 2);
  18.439 -        s.writeFields();
  18.440 -
  18.441 -        if (listeners != null) {
  18.442 -            for (VetoableChangeListener l : listeners) {
  18.443 -                if (l instanceof Serializable) {
  18.444 -                    s.writeObject(l);
  18.445 -                }
  18.446 -            }
  18.447 -        }
  18.448 -        s.writeObject(null);
  18.449 -    }
  18.450 -
  18.451 -    private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {
  18.452 -        this.map = new VetoableChangeListenerMap();
  18.453 -
  18.454 -        ObjectInputStream.GetField fields = s.readFields();
  18.455 -
  18.456 -        Hashtable<String, VetoableChangeSupport> children = (Hashtable<String, VetoableChangeSupport>) fields.get("children", null);
  18.457 -        this.source = fields.get("source", null);
  18.458 -        fields.get("vetoableChangeSupportSerializedDataVersion", 2);
  18.459 -
  18.460 -        Object listenerOrNull;
  18.461 -        while (null != (listenerOrNull = s.readObject())) {
  18.462 -            this.map.add(null, (VetoableChangeListener)listenerOrNull);
  18.463 -        }
  18.464 -        if (children != null) {
  18.465 -            for (Entry<String, VetoableChangeSupport> entry : children.entrySet()) {
  18.466 -                for (VetoableChangeListener listener : entry.getValue().getVetoableChangeListeners()) {
  18.467 -                    this.map.add(entry.getKey(), listener);
  18.468 -                }
  18.469 -            }
  18.470 -        }
  18.471 -    }
  18.472 -
  18.473 -    /**
  18.474 -     * The object to be provided as the "source" for any generated events.
  18.475 -     */
  18.476 -    private Object source;
  18.477 -
  18.478 -    /**
  18.479 -     * @serialField children                                   Hashtable
  18.480 -     * @serialField source                                     Object
  18.481 -     * @serialField vetoableChangeSupportSerializedDataVersion int
  18.482 -     */
  18.483 -    private static final ObjectStreamField[] serialPersistentFields = {
  18.484 -            new ObjectStreamField("children", Hashtable.class),
  18.485 -            new ObjectStreamField("source", Object.class),
  18.486 -            new ObjectStreamField("vetoableChangeSupportSerializedDataVersion", Integer.TYPE)
  18.487 -    };
  18.488 -
  18.489 -    /**
  18.490 -     * Serialization version ID, so we're compatible with JDK 1.1
  18.491 -     */
  18.492 -    static final long serialVersionUID = -5090210921595982017L;
  18.493 -
  18.494 -    /**
  18.495 -     * This is a {@link ChangeListenerMap ChangeListenerMap} implementation
  18.496 -     * that works with {@link VetoableChangeListener VetoableChangeListener} objects.
  18.497 -     */
  18.498 -    private static final class VetoableChangeListenerMap extends ChangeListenerMap<VetoableChangeListener> {
  18.499 -        private static final VetoableChangeListener[] EMPTY = {};
  18.500 -
  18.501 -        /**
  18.502 -         * Creates an array of {@link VetoableChangeListener VetoableChangeListener} objects.
  18.503 -         * This method uses the same instance of the empty array
  18.504 -         * when {@code length} equals {@code 0}.
  18.505 -         *
  18.506 -         * @param length  the array length
  18.507 -         * @return        an array with specified length
  18.508 -         */
  18.509 -        @Override
  18.510 -        protected VetoableChangeListener[] newArray(int length) {
  18.511 -            return (0 < length)
  18.512 -                    ? new VetoableChangeListener[length]
  18.513 -                    : EMPTY;
  18.514 -        }
  18.515 -
  18.516 -        /**
  18.517 -         * Creates a {@link VetoableChangeListenerProxy VetoableChangeListenerProxy}
  18.518 -         * object for the specified property.
  18.519 -         *
  18.520 -         * @param name      the name of the property to listen on
  18.521 -         * @param listener  the listener to process events
  18.522 -         * @return          a {@code VetoableChangeListenerProxy} object
  18.523 -         */
  18.524 -        @Override
  18.525 -        protected VetoableChangeListener newProxy(String name, VetoableChangeListener listener) {
  18.526 -            return new VetoableChangeListenerProxy(name, listener);
  18.527 -        }
  18.528 -    }
  18.529 -}
    19.1 --- a/emul/compact/src/main/java/java/io/Bits.java	Tue Feb 26 14:55:55 2013 +0100
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,123 +0,0 @@
    19.4 -/*
    19.5 - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
    19.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    19.7 - *
    19.8 - * This code is free software; you can redistribute it and/or modify it
    19.9 - * under the terms of the GNU General Public License version 2 only, as
   19.10 - * published by the Free Software Foundation.  Oracle designates this
   19.11 - * particular file as subject to the "Classpath" exception as provided
   19.12 - * by Oracle in the LICENSE file that accompanied this code.
   19.13 - *
   19.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   19.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   19.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   19.17 - * version 2 for more details (a copy is included in the LICENSE file that
   19.18 - * accompanied this code).
   19.19 - *
   19.20 - * You should have received a copy of the GNU General Public License version
   19.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   19.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   19.23 - *
   19.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   19.25 - * or visit www.oracle.com if you need additional information or have any
   19.26 - * questions.
   19.27 - */
   19.28 -
   19.29 -package java.io;
   19.30 -
   19.31 -/**
   19.32 - * Utility methods for packing/unpacking primitive values in/out of byte arrays
   19.33 - * using big-endian byte ordering.
   19.34 - */
   19.35 -class Bits {
   19.36 -
   19.37 -    /*
   19.38 -     * Methods for unpacking primitive values from byte arrays starting at
   19.39 -     * given offsets.
   19.40 -     */
   19.41 -
   19.42 -    static boolean getBoolean(byte[] b, int off) {
   19.43 -        return b[off] != 0;
   19.44 -    }
   19.45 -
   19.46 -    static char getChar(byte[] b, int off) {
   19.47 -        return (char) ((b[off + 1] & 0xFF) +
   19.48 -                       (b[off] << 8));
   19.49 -    }
   19.50 -
   19.51 -    static short getShort(byte[] b, int off) {
   19.52 -        return (short) ((b[off + 1] & 0xFF) +
   19.53 -                        (b[off] << 8));
   19.54 -    }
   19.55 -
   19.56 -    static int getInt(byte[] b, int off) {
   19.57 -        return ((b[off + 3] & 0xFF)      ) +
   19.58 -               ((b[off + 2] & 0xFF) <<  8) +
   19.59 -               ((b[off + 1] & 0xFF) << 16) +
   19.60 -               ((b[off    ]       ) << 24);
   19.61 -    }
   19.62 -
   19.63 -    static float getFloat(byte[] b, int off) {
   19.64 -        return Float.intBitsToFloat(getInt(b, off));
   19.65 -    }
   19.66 -
   19.67 -    static long getLong(byte[] b, int off) {
   19.68 -        return ((b[off + 7] & 0xFFL)      ) +
   19.69 -               ((b[off + 6] & 0xFFL) <<  8) +
   19.70 -               ((b[off + 5] & 0xFFL) << 16) +
   19.71 -               ((b[off + 4] & 0xFFL) << 24) +
   19.72 -               ((b[off + 3] & 0xFFL) << 32) +
   19.73 -               ((b[off + 2] & 0xFFL) << 40) +
   19.74 -               ((b[off + 1] & 0xFFL) << 48) +
   19.75 -               (((long) b[off])      << 56);
   19.76 -    }
   19.77 -
   19.78 -    static double getDouble(byte[] b, int off) {
   19.79 -        return Double.longBitsToDouble(getLong(b, off));
   19.80 -    }
   19.81 -
   19.82 -    /*
   19.83 -     * Methods for packing primitive values into byte arrays starting at given
   19.84 -     * offsets.
   19.85 -     */
   19.86 -
   19.87 -    static void putBoolean(byte[] b, int off, boolean val) {
   19.88 -        b[off] = (byte) (val ? 1 : 0);
   19.89 -    }
   19.90 -
   19.91 -    static void putChar(byte[] b, int off, char val) {
   19.92 -        b[off + 1] = (byte) (val      );
   19.93 -        b[off    ] = (byte) (val >>> 8);
   19.94 -    }
   19.95 -
   19.96 -    static void putShort(byte[] b, int off, short val) {
   19.97 -        b[off + 1] = (byte) (val      );
   19.98 -        b[off    ] = (byte) (val >>> 8);
   19.99 -    }
  19.100 -
  19.101 -    static void putInt(byte[] b, int off, int val) {
  19.102 -        b[off + 3] = (byte) (val       );
  19.103 -        b[off + 2] = (byte) (val >>>  8);
  19.104 -        b[off + 1] = (byte) (val >>> 16);
  19.105 -        b[off    ] = (byte) (val >>> 24);
  19.106 -    }
  19.107 -
  19.108 -    static void putFloat(byte[] b, int off, float val) {
  19.109 -        putInt(b, off,  Float.floatToIntBits(val));
  19.110 -    }
  19.111 -
  19.112 -    static void putLong(byte[] b, int off, long val) {
  19.113 -        b[off + 7] = (byte) (val       );
  19.114 -        b[off + 6] = (byte) (val >>>  8);
  19.115 -        b[off + 5] = (byte) (val >>> 16);
  19.116 -        b[off + 4] = (byte) (val >>> 24);
  19.117 -        b[off + 3] = (byte) (val >>> 32);
  19.118 -        b[off + 2] = (byte) (val >>> 40);
  19.119 -        b[off + 1] = (byte) (val >>> 48);
  19.120 -        b[off    ] = (byte) (val >>> 56);
  19.121 -    }
  19.122 -
  19.123 -    static void putDouble(byte[] b, int off, double val) {
  19.124 -        putLong(b, off, Double.doubleToLongBits(val));
  19.125 -    }
  19.126 -}
    20.1 --- a/emul/compact/src/main/java/java/io/BufferedOutputStream.java	Tue Feb 26 14:55:55 2013 +0100
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,143 +0,0 @@
    20.4 -/*
    20.5 - * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
    20.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    20.7 - *
    20.8 - * This code is free software; you can redistribute it and/or modify it
    20.9 - * under the terms of the GNU General Public License version 2 only, as
   20.10 - * published by the Free Software Foundation.  Oracle designates this
   20.11 - * particular file as subject to the "Classpath" exception as provided
   20.12 - * by Oracle in the LICENSE file that accompanied this code.
   20.13 - *
   20.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   20.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   20.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   20.17 - * version 2 for more details (a copy is included in the LICENSE file that
   20.18 - * accompanied this code).
   20.19 - *
   20.20 - * You should have received a copy of the GNU General Public License version
   20.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   20.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   20.23 - *
   20.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   20.25 - * or visit www.oracle.com if you need additional information or have any
   20.26 - * questions.
   20.27 - */
   20.28 -
   20.29 -package java.io;
   20.30 -
   20.31 -/**
   20.32 - * The class implements a buffered output stream. By setting up such
   20.33 - * an output stream, an application can write bytes to the underlying
   20.34 - * output stream without necessarily causing a call to the underlying
   20.35 - * system for each byte written.
   20.36 - *
   20.37 - * @author  Arthur van Hoff
   20.38 - * @since   JDK1.0
   20.39 - */
   20.40 -public
   20.41 -class BufferedOutputStream extends FilterOutputStream {
   20.42 -    /**
   20.43 -     * The internal buffer where data is stored.
   20.44 -     */
   20.45 -    protected byte buf[];
   20.46 -
   20.47 -    /**
   20.48 -     * The number of valid bytes in the buffer. This value is always
   20.49 -     * in the range <tt>0</tt> through <tt>buf.length</tt>; elements
   20.50 -     * <tt>buf[0]</tt> through <tt>buf[count-1]</tt> contain valid
   20.51 -     * byte data.
   20.52 -     */
   20.53 -    protected int count;
   20.54 -
   20.55 -    /**
   20.56 -     * Creates a new buffered output stream to write data to the
   20.57 -     * specified underlying output stream.
   20.58 -     *
   20.59 -     * @param   out   the underlying output stream.
   20.60 -     */
   20.61 -    public BufferedOutputStream(OutputStream out) {
   20.62 -        this(out, 8192);
   20.63 -    }
   20.64 -
   20.65 -    /**
   20.66 -     * Creates a new buffered output stream to write data to the
   20.67 -     * specified underlying output stream with the specified buffer
   20.68 -     * size.
   20.69 -     *
   20.70 -     * @param   out    the underlying output stream.
   20.71 -     * @param   size   the buffer size.
   20.72 -     * @exception IllegalArgumentException if size &lt;= 0.
   20.73 -     */
   20.74 -    public BufferedOutputStream(OutputStream out, int size) {
   20.75 -        super(out);
   20.76 -        if (size <= 0) {
   20.77 -            throw new IllegalArgumentException("Buffer size <= 0");
   20.78 -        }
   20.79 -        buf = new byte[size];
   20.80 -    }
   20.81 -
   20.82 -    /** Flush the internal buffer */
   20.83 -    private void flushBuffer() throws IOException {
   20.84 -        if (count > 0) {
   20.85 -            out.write(buf, 0, count);
   20.86 -            count = 0;
   20.87 -        }
   20.88 -    }
   20.89 -
   20.90 -    /**
   20.91 -     * Writes the specified byte to this buffered output stream.
   20.92 -     *
   20.93 -     * @param      b   the byte to be written.
   20.94 -     * @exception  IOException  if an I/O error occurs.
   20.95 -     */
   20.96 -    public synchronized void write(int b) throws IOException {
   20.97 -        if (count >= buf.length) {
   20.98 -            flushBuffer();
   20.99 -        }
  20.100 -        buf[count++] = (byte)b;
  20.101 -    }
  20.102 -
  20.103 -    /**
  20.104 -     * Writes <code>len</code> bytes from the specified byte array
  20.105 -     * starting at offset <code>off</code> to this buffered output stream.
  20.106 -     *
  20.107 -     * <p> Ordinarily this method stores bytes from the given array into this
  20.108 -     * stream's buffer, flushing the buffer to the underlying output stream as
  20.109 -     * needed.  If the requested length is at least as large as this stream's
  20.110 -     * buffer, however, then this method will flush the buffer and write the
  20.111 -     * bytes directly to the underlying output stream.  Thus redundant
  20.112 -     * <code>BufferedOutputStream</code>s will not copy data unnecessarily.
  20.113 -     *
  20.114 -     * @param      b     the data.
  20.115 -     * @param      off   the start offset in the data.
  20.116 -     * @param      len   the number of bytes to write.
  20.117 -     * @exception  IOException  if an I/O error occurs.
  20.118 -     */
  20.119 -    public synchronized void write(byte b[], int off, int len) throws IOException {
  20.120 -        if (len >= buf.length) {
  20.121 -            /* If the request length exceeds the size of the output buffer,
  20.122 -               flush the output buffer and then write the data directly.
  20.123 -               In this way buffered streams will cascade harmlessly. */
  20.124 -            flushBuffer();
  20.125 -            out.write(b, off, len);
  20.126 -            return;
  20.127 -        }
  20.128 -        if (len > buf.length - count) {
  20.129 -            flushBuffer();
  20.130 -        }
  20.131 -        System.arraycopy(b, off, buf, count, len);
  20.132 -        count += len;
  20.133 -    }
  20.134 -
  20.135 -    /**
  20.136 -     * Flushes this buffered output stream. This forces any buffered
  20.137 -     * output bytes to be written out to the underlying output stream.
  20.138 -     *
  20.139 -     * @exception  IOException  if an I/O error occurs.
  20.140 -     * @see        java.io.FilterOutputStream#out
  20.141 -     */
  20.142 -    public synchronized void flush() throws IOException {
  20.143 -        flushBuffer();
  20.144 -        out.flush();
  20.145 -    }
  20.146 -}
    21.1 --- a/emul/compact/src/main/java/java/io/BufferedReader.java	Tue Feb 26 14:55:55 2013 +0100
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,523 +0,0 @@
    21.4 -/*
    21.5 - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
    21.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    21.7 - *
    21.8 - * This code is free software; you can redistribute it and/or modify it
    21.9 - * under the terms of the GNU General Public License version 2 only, as
   21.10 - * published by the Free Software Foundation.  Oracle designates this
   21.11 - * particular file as subject to the "Classpath" exception as provided
   21.12 - * by Oracle in the LICENSE file that accompanied this code.
   21.13 - *
   21.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   21.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   21.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   21.17 - * version 2 for more details (a copy is included in the LICENSE file that
   21.18 - * accompanied this code).
   21.19 - *
   21.20 - * You should have received a copy of the GNU General Public License version
   21.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   21.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   21.23 - *
   21.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   21.25 - * or visit www.oracle.com if you need additional information or have any
   21.26 - * questions.
   21.27 - */
   21.28 -
   21.29 -package java.io;
   21.30 -
   21.31 -
   21.32 -
   21.33 -/**
   21.34 - * Reads text from a character-input stream, buffering characters so as to
   21.35 - * provide for the efficient reading of characters, arrays, and lines.
   21.36 - *
   21.37 - * <p> The buffer size may be specified, or the default size may be used.  The
   21.38 - * default is large enough for most purposes.
   21.39 - *
   21.40 - * <p> In general, each read request made of a Reader causes a corresponding
   21.41 - * read request to be made of the underlying character or byte stream.  It is
   21.42 - * therefore advisable to wrap a BufferedReader around any Reader whose read()
   21.43 - * operations may be costly, such as FileReaders and InputStreamReaders.  For
   21.44 - * example,
   21.45 - *
   21.46 - * <pre>
   21.47 - * BufferedReader in
   21.48 - *   = new BufferedReader(new FileReader("foo.in"));
   21.49 - * </pre>
   21.50 - *
   21.51 - * will buffer the input from the specified file.  Without buffering, each
   21.52 - * invocation of read() or readLine() could cause bytes to be read from the
   21.53 - * file, converted into characters, and then returned, which can be very
   21.54 - * inefficient.
   21.55 - *
   21.56 - * <p> Programs that use DataInputStreams for textual input can be localized by
   21.57 - * replacing each DataInputStream with an appropriate BufferedReader.
   21.58 - *
   21.59 - * @see FileReader
   21.60 - * @see InputStreamReader
   21.61 - * @see java.nio.file.Files#newBufferedReader
   21.62 - *
   21.63 - * @author      Mark Reinhold
   21.64 - * @since       JDK1.1
   21.65 - */
   21.66 -
   21.67 -public class BufferedReader extends Reader {
   21.68 -
   21.69 -    private Reader in;
   21.70 -
   21.71 -    private char cb[];
   21.72 -    private int nChars, nextChar;
   21.73 -
   21.74 -    private static final int INVALIDATED = -2;
   21.75 -    private static final int UNMARKED = -1;
   21.76 -    private int markedChar = UNMARKED;
   21.77 -    private int readAheadLimit = 0; /* Valid only when markedChar > 0 */
   21.78 -
   21.79 -    /** If the next character is a line feed, skip it */
   21.80 -    private boolean skipLF = false;
   21.81 -
   21.82 -    /** The skipLF flag when the mark was set */
   21.83 -    private boolean markedSkipLF = false;
   21.84 -
   21.85 -    private static int defaultCharBufferSize = 8192;
   21.86 -    private static int defaultExpectedLineLength = 80;
   21.87 -
   21.88 -    /**
   21.89 -     * Creates a buffering character-input stream that uses an input buffer of
   21.90 -     * the specified size.
   21.91 -     *
   21.92 -     * @param  in   A Reader
   21.93 -     * @param  sz   Input-buffer size
   21.94 -     *
   21.95 -     * @exception  IllegalArgumentException  If sz is <= 0
   21.96 -     */
   21.97 -    public BufferedReader(Reader in, int sz) {
   21.98 -        super(in);
   21.99 -        if (sz <= 0)
  21.100 -            throw new IllegalArgumentException("Buffer size <= 0");
  21.101 -        this.in = in;
  21.102 -        cb = new char[sz];
  21.103 -        nextChar = nChars = 0;
  21.104 -    }
  21.105 -
  21.106 -    /**
  21.107 -     * Creates a buffering character-input stream that uses a default-sized
  21.108 -     * input buffer.
  21.109 -     *
  21.110 -     * @param  in   A Reader
  21.111 -     */
  21.112 -    public BufferedReader(Reader in) {
  21.113 -        this(in, defaultCharBufferSize);
  21.114 -    }
  21.115 -
  21.116 -    /** Checks to make sure that the stream has not been closed */
  21.117 -    private void ensureOpen() throws IOException {
  21.118 -        if (in == null)
  21.119 -            throw new IOException("Stream closed");
  21.120 -    }
  21.121 -
  21.122 -    /**
  21.123 -     * Fills the input buffer, taking the mark into account if it is valid.
  21.124 -     */
  21.125 -    private void fill() throws IOException {
  21.126 -        int dst;
  21.127 -        if (markedChar <= UNMARKED) {
  21.128 -            /* No mark */
  21.129 -            dst = 0;
  21.130 -        } else {
  21.131 -            /* Marked */
  21.132 -            int delta = nextChar - markedChar;
  21.133 -            if (delta >= readAheadLimit) {
  21.134 -                /* Gone past read-ahead limit: Invalidate mark */
  21.135 -                markedChar = INVALIDATED;
  21.136 -                readAheadLimit = 0;
  21.137 -                dst = 0;
  21.138 -            } else {
  21.139 -                if (readAheadLimit <= cb.length) {
  21.140 -                    /* Shuffle in the current buffer */
  21.141 -                    System.arraycopy(cb, markedChar, cb, 0, delta);
  21.142 -                    markedChar = 0;
  21.143 -                    dst = delta;
  21.144 -                } else {
  21.145 -                    /* Reallocate buffer to accommodate read-ahead limit */
  21.146 -                    char ncb[] = new char[readAheadLimit];
  21.147 -                    System.arraycopy(cb, markedChar, ncb, 0, delta);
  21.148 -                    cb = ncb;
  21.149 -                    markedChar = 0;
  21.150 -                    dst = delta;
  21.151 -                }
  21.152 -                nextChar = nChars = delta;
  21.153 -            }
  21.154 -        }
  21.155 -
  21.156 -        int n;
  21.157 -        do {
  21.158 -            n = in.read(cb, dst, cb.length - dst);
  21.159 -        } while (n == 0);
  21.160 -        if (n > 0) {
  21.161 -            nChars = dst + n;
  21.162 -            nextChar = dst;
  21.163 -        }
  21.164 -    }
  21.165 -
  21.166 -    /**
  21.167 -     * Reads a single character.
  21.168 -     *
  21.169 -     * @return The character read, as an integer in the range
  21.170 -     *         0 to 65535 (<tt>0x00-0xffff</tt>), or -1 if the
  21.171 -     *         end of the stream has been reached
  21.172 -     * @exception  IOException  If an I/O error occurs
  21.173 -     */
  21.174 -    public int read() throws IOException {
  21.175 -        synchronized (lock) {
  21.176 -            ensureOpen();
  21.177 -            for (;;) {
  21.178 -                if (nextChar >= nChars) {
  21.179 -                    fill();
  21.180 -                    if (nextChar >= nChars)
  21.181 -                        return -1;
  21.182 -                }
  21.183 -                if (skipLF) {
  21.184 -                    skipLF = false;
  21.185 -                    if (cb[nextChar] == '\n') {
  21.186 -                        nextChar++;
  21.187 -                        continue;
  21.188 -                    }
  21.189 -                }
  21.190 -                return cb[nextChar++];
  21.191 -            }
  21.192 -        }
  21.193 -    }
  21.194 -
  21.195 -    /**
  21.196 -     * Reads characters into a portion of an array, reading from the underlying
  21.197 -     * stream if necessary.
  21.198 -     */
  21.199 -    private int read1(char[] cbuf, int off, int len) throws IOException {
  21.200 -        if (nextChar >= nChars) {
  21.201 -            /* If the requested length is at least as large as the buffer, and
  21.202 -               if there is no mark/reset activity, and if line feeds are not
  21.203 -               being skipped, do not bother to copy the characters into the
  21.204 -               local buffer.  In this way buffered streams will cascade
  21.205 -               harmlessly. */
  21.206 -            if (len >= cb.length && markedChar <= UNMARKED && !skipLF) {
  21.207 -                return in.read(cbuf, off, len);
  21.208 -            }
  21.209 -            fill();
  21.210 -        }
  21.211 -        if (nextChar >= nChars) return -1;
  21.212 -        if (skipLF) {
  21.213 -            skipLF = false;
  21.214 -            if (cb[nextChar] == '\n') {
  21.215 -                nextChar++;
  21.216 -                if (nextChar >= nChars)
  21.217 -                    fill();
  21.218 -                if (nextChar >= nChars)
  21.219 -                    return -1;
  21.220 -            }
  21.221 -        }
  21.222 -        int n = Math.min(len, nChars - nextChar);
  21.223 -        System.arraycopy(cb, nextChar, cbuf, off, n);
  21.224 -        nextChar += n;
  21.225 -        return n;
  21.226 -    }
  21.227 -
  21.228 -    /**
  21.229 -     * Reads characters into a portion of an array.
  21.230 -     *
  21.231 -     * <p> This method implements the general contract of the corresponding
  21.232 -     * <code>{@link Reader#read(char[], int, int) read}</code> method of the
  21.233 -     * <code>{@link Reader}</code> class.  As an additional convenience, it
  21.234 -     * attempts to read as many characters as possible by repeatedly invoking
  21.235 -     * the <code>read</code> method of the underlying stream.  This iterated
  21.236 -     * <code>read</code> continues until one of the following conditions becomes
  21.237 -     * true: <ul>
  21.238 -     *
  21.239 -     *   <li> The specified number of characters have been read,
  21.240 -     *
  21.241 -     *   <li> The <code>read</code> method of the underlying stream returns
  21.242 -     *   <code>-1</code>, indicating end-of-file, or
  21.243 -     *
  21.244 -     *   <li> The <code>ready</code> method of the underlying stream
  21.245 -     *   returns <code>false</code>, indicating that further input requests
  21.246 -     *   would block.
  21.247 -     *
  21.248 -     * </ul> If the first <code>read</code> on the underlying stream returns
  21.249 -     * <code>-1</code> to indicate end-of-file then this method returns
  21.250 -     * <code>-1</code>.  Otherwise this method returns the number of characters
  21.251 -     * actually read.
  21.252 -     *
  21.253 -     * <p> Subclasses of this class are encouraged, but not required, to
  21.254 -     * attempt to read as many characters as possible in the same fashion.
  21.255 -     *
  21.256 -     * <p> Ordinarily this method takes characters from this stream's character
  21.257 -     * buffer, filling it from the underlying stream as necessary.  If,
  21.258 -     * however, the buffer is empty, the mark is not valid, and the requested
  21.259 -     * length is at least as large as the buffer, then this method will read
  21.260 -     * characters directly from the underlying stream into the given array.
  21.261 -     * Thus redundant <code>BufferedReader</code>s will not copy data
  21.262 -     * unnecessarily.
  21.263 -     *
  21.264 -     * @param      cbuf  Destination buffer
  21.265 -     * @param      off   Offset at which to start storing characters
  21.266 -     * @param      len   Maximum number of characters to read
  21.267 -     *
  21.268 -     * @return     The number of characters read, or -1 if the end of the
  21.269 -     *             stream has been reached
  21.270 -     *
  21.271 -     * @exception  IOException  If an I/O error occurs
  21.272 -     */
  21.273 -    public int read(char cbuf[], int off, int len) throws IOException {
  21.274 -        synchronized (lock) {
  21.275 -            ensureOpen();
  21.276 -            if ((off < 0) || (off > cbuf.length) || (len < 0) ||
  21.277 -                ((off + len) > cbuf.length) || ((off + len) < 0)) {
  21.278 -                throw new IndexOutOfBoundsException();
  21.279 -            } else if (len == 0) {
  21.280 -                return 0;
  21.281 -            }
  21.282 -
  21.283 -            int n = read1(cbuf, off, len);
  21.284 -            if (n <= 0) return n;
  21.285 -            while ((n < len) && in.ready()) {
  21.286 -                int n1 = read1(cbuf, off + n, len - n);
  21.287 -                if (n1 <= 0) break;
  21.288 -                n += n1;
  21.289 -            }
  21.290 -            return n;
  21.291 -        }
  21.292 -    }
  21.293 -
  21.294 -    /**
  21.295 -     * Reads a line of text.  A line is considered to be terminated by any one
  21.296 -     * of a line feed ('\n'), a carriage return ('\r'), or a carriage return
  21.297 -     * followed immediately by a linefeed.
  21.298 -     *
  21.299 -     * @param      ignoreLF  If true, the next '\n' will be skipped
  21.300 -     *
  21.301 -     * @return     A String containing the contents of the line, not including
  21.302 -     *             any line-termination characters, or null if the end of the
  21.303 -     *             stream has been reached
  21.304 -     *
  21.305 -     * @see        java.io.LineNumberReader#readLine()
  21.306 -     *
  21.307 -     * @exception  IOException  If an I/O error occurs
  21.308 -     */
  21.309 -    String readLine(boolean ignoreLF) throws IOException {
  21.310 -        StringBuffer s = null;
  21.311 -        int startChar;
  21.312 -
  21.313 -        synchronized (lock) {
  21.314 -            ensureOpen();
  21.315 -            boolean omitLF = ignoreLF || skipLF;
  21.316 -
  21.317 -        bufferLoop:
  21.318 -            for (;;) {
  21.319 -
  21.320 -                if (nextChar >= nChars)
  21.321 -                    fill();
  21.322 -                if (nextChar >= nChars) { /* EOF */
  21.323 -                    if (s != null && s.length() > 0)
  21.324 -                        return s.toString();
  21.325 -                    else
  21.326 -                        return null;
  21.327 -                }
  21.328 -                boolean eol = false;
  21.329 -                char c = 0;
  21.330 -                int i;
  21.331 -
  21.332 -                /* Skip a leftover '\n', if necessary */
  21.333 -                if (omitLF && (cb[nextChar] == '\n'))
  21.334 -                    nextChar++;
  21.335 -                skipLF = false;
  21.336 -                omitLF = false;
  21.337 -
  21.338 -            charLoop:
  21.339 -                for (i = nextChar; i < nChars; i++) {
  21.340 -                    c = cb[i];
  21.341 -                    if ((c == '\n') || (c == '\r')) {
  21.342 -                        eol = true;
  21.343 -                        break charLoop;
  21.344 -                    }
  21.345 -                }
  21.346 -
  21.347 -                startChar = nextChar;
  21.348 -                nextChar = i;
  21.349 -
  21.350 -                if (eol) {
  21.351 -                    String str;
  21.352 -                    if (s == null) {
  21.353 -                        str = new String(cb, startChar, i - startChar);
  21.354 -                    } else {
  21.355 -                        s.append(cb, startChar, i - startChar);
  21.356 -                        str = s.toString();
  21.357 -                    }
  21.358 -                    nextChar++;
  21.359 -                    if (c == '\r') {
  21.360 -                        skipLF = true;
  21.361 -                    }
  21.362 -                    return str;
  21.363 -                }
  21.364 -
  21.365 -                if (s == null)
  21.366 -                    s = new StringBuffer(defaultExpectedLineLength);
  21.367 -                s.append(cb, startChar, i - startChar);
  21.368 -            }
  21.369 -        }
  21.370 -    }
  21.371 -
  21.372 -    /**
  21.373 -     * Reads a line of text.  A line is considered to be terminated by any one
  21.374 -     * of a line feed ('\n'), a carriage return ('\r'), or a carriage return
  21.375 -     * followed immediately by a linefeed.
  21.376 -     *
  21.377 -     * @return     A String containing the contents of the line, not including
  21.378 -     *             any line-termination characters, or null if the end of the
  21.379 -     *             stream has been reached
  21.380 -     *
  21.381 -     * @exception  IOException  If an I/O error occurs
  21.382 -     *
  21.383 -     * @see java.nio.file.Files#readAllLines
  21.384 -     */
  21.385 -    public String readLine() throws IOException {
  21.386 -        return readLine(false);
  21.387 -    }
  21.388 -
  21.389 -    /**
  21.390 -     * Skips characters.
  21.391 -     *
  21.392 -     * @param  n  The number of characters to skip
  21.393 -     *
  21.394 -     * @return    The number of characters actually skipped
  21.395 -     *
  21.396 -     * @exception  IllegalArgumentException  If <code>n</code> is negative.
  21.397 -     * @exception  IOException  If an I/O error occurs
  21.398 -     */
  21.399 -    public long skip(long n) throws IOException {
  21.400 -        if (n < 0L) {
  21.401 -            throw new IllegalArgumentException("skip value is negative");
  21.402 -        }
  21.403 -        synchronized (lock) {
  21.404 -            ensureOpen();
  21.405 -            long r = n;
  21.406 -            while (r > 0) {
  21.407 -                if (nextChar >= nChars)
  21.408 -                    fill();
  21.409 -                if (nextChar >= nChars) /* EOF */
  21.410 -                    break;
  21.411 -                if (skipLF) {
  21.412 -                    skipLF = false;
  21.413 -                    if (cb[nextChar] == '\n') {
  21.414 -                        nextChar++;
  21.415 -                    }
  21.416 -                }
  21.417 -                long d = nChars - nextChar;
  21.418 -                if (r <= d) {
  21.419 -                    nextChar += r;
  21.420 -                    r = 0;
  21.421 -                    break;
  21.422 -                }
  21.423 -                else {
  21.424 -                    r -= d;
  21.425 -                    nextChar = nChars;
  21.426 -                }
  21.427 -            }
  21.428 -            return n - r;
  21.429 -        }
  21.430 -    }
  21.431 -
  21.432 -    /**
  21.433 -     * Tells whether this stream is ready to be read.  A buffered character
  21.434 -     * stream is ready if the buffer is not empty, or if the underlying
  21.435 -     * character stream is ready.
  21.436 -     *
  21.437 -     * @exception  IOException  If an I/O error occurs
  21.438 -     */
  21.439 -    public boolean ready() throws IOException {
  21.440 -        synchronized (lock) {
  21.441 -            ensureOpen();
  21.442 -
  21.443 -            /*
  21.444 -             * If newline needs to be skipped and the next char to be read
  21.445 -             * is a newline character, then just skip it right away.
  21.446 -             */
  21.447 -            if (skipLF) {
  21.448 -                /* Note that in.ready() will return true if and only if the next
  21.449 -                 * read on the stream will not block.
  21.450 -                 */
  21.451 -                if (nextChar >= nChars && in.ready()) {
  21.452 -                    fill();
  21.453 -                }
  21.454 -                if (nextChar < nChars) {
  21.455 -                    if (cb[nextChar] == '\n')
  21.456 -                        nextChar++;
  21.457 -                    skipLF = false;
  21.458 -                }
  21.459 -            }
  21.460 -            return (nextChar < nChars) || in.ready();
  21.461 -        }
  21.462 -    }
  21.463 -
  21.464 -    /**
  21.465 -     * Tells whether this stream supports the mark() operation, which it does.
  21.466 -     */
  21.467 -    public boolean markSupported() {
  21.468 -        return true;
  21.469 -    }
  21.470 -
  21.471 -    /**
  21.472 -     * Marks the present position in the stream.  Subsequent calls to reset()
  21.473 -     * will attempt to reposition the stream to this point.
  21.474 -     *
  21.475 -     * @param readAheadLimit   Limit on the number of characters that may be
  21.476 -     *                         read while still preserving the mark. An attempt
  21.477 -     *                         to reset the stream after reading characters
  21.478 -     *                         up to this limit or beyond may fail.
  21.479 -     *                         A limit value larger than the size of the input
  21.480 -     *                         buffer will cause a new buffer to be allocated
  21.481 -     *                         whose size is no smaller than limit.
  21.482 -     *                         Therefore large values should be used with care.
  21.483 -     *
  21.484 -     * @exception  IllegalArgumentException  If readAheadLimit is < 0
  21.485 -     * @exception  IOException  If an I/O error occurs
  21.486 -     */
  21.487 -    public void mark(int readAheadLimit) throws IOException {
  21.488 -        if (readAheadLimit < 0) {
  21.489 -            throw new IllegalArgumentException("Read-ahead limit < 0");
  21.490 -        }
  21.491 -        synchronized (lock) {
  21.492 -            ensureOpen();
  21.493 -            this.readAheadLimit = readAheadLimit;
  21.494 -            markedChar = nextChar;
  21.495 -            markedSkipLF = skipLF;
  21.496 -        }
  21.497 -    }
  21.498 -
  21.499 -    /**
  21.500 -     * Resets the stream to the most recent mark.
  21.501 -     *
  21.502 -     * @exception  IOException  If the stream has never been marked,
  21.503 -     *                          or if the mark has been invalidated
  21.504 -     */
  21.505 -    public void reset() throws IOException {
  21.506 -        synchronized (lock) {
  21.507 -            ensureOpen();
  21.508 -            if (markedChar < 0)
  21.509 -                throw new IOException((markedChar == INVALIDATED)
  21.510 -                                      ? "Mark invalid"
  21.511 -                                      : "Stream not marked");
  21.512 -            nextChar = markedChar;
  21.513 -            skipLF = markedSkipLF;
  21.514 -        }
  21.515 -    }
  21.516 -
  21.517 -    public void close() throws IOException {
  21.518 -        synchronized (lock) {
  21.519 -            if (in == null)
  21.520 -                return;
  21.521 -            in.close();
  21.522 -            in = null;
  21.523 -            cb = null;
  21.524 -        }
  21.525 -    }
  21.526 -}
    22.1 --- a/emul/compact/src/main/java/java/io/ByteArrayOutputStream.java	Tue Feb 26 14:55:55 2013 +0100
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,272 +0,0 @@
    22.4 -/*
    22.5 - * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
    22.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    22.7 - *
    22.8 - * This code is free software; you can redistribute it and/or modify it
    22.9 - * under the terms of the GNU General Public License version 2 only, as
   22.10 - * published by the Free Software Foundation.  Oracle designates this
   22.11 - * particular file as subject to the "Classpath" exception as provided
   22.12 - * by Oracle in the LICENSE file that accompanied this code.
   22.13 - *
   22.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   22.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   22.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   22.17 - * version 2 for more details (a copy is included in the LICENSE file that
   22.18 - * accompanied this code).
   22.19 - *
   22.20 - * You should have received a copy of the GNU General Public License version
   22.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   22.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   22.23 - *
   22.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   22.25 - * or visit www.oracle.com if you need additional information or have any
   22.26 - * questions.
   22.27 - */
   22.28 -
   22.29 -package java.io;
   22.30 -
   22.31 -import java.util.Arrays;
   22.32 -
   22.33 -/**
   22.34 - * This class implements an output stream in which the data is
   22.35 - * written into a byte array. The buffer automatically grows as data
   22.36 - * is written to it.
   22.37 - * The data can be retrieved using <code>toByteArray()</code> and
   22.38 - * <code>toString()</code>.
   22.39 - * <p>
   22.40 - * Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in
   22.41 - * this class can be called after the stream has been closed without
   22.42 - * generating an <tt>IOException</tt>.
   22.43 - *
   22.44 - * @author  Arthur van Hoff
   22.45 - * @since   JDK1.0
   22.46 - */
   22.47 -
   22.48 -public class ByteArrayOutputStream extends OutputStream {
   22.49 -
   22.50 -    /**
   22.51 -     * The buffer where data is stored.
   22.52 -     */
   22.53 -    protected byte buf[];
   22.54 -
   22.55 -    /**
   22.56 -     * The number of valid bytes in the buffer.
   22.57 -     */
   22.58 -    protected int count;
   22.59 -
   22.60 -    /**
   22.61 -     * Creates a new byte array output stream. The buffer capacity is
   22.62 -     * initially 32 bytes, though its size increases if necessary.
   22.63 -     */
   22.64 -    public ByteArrayOutputStream() {
   22.65 -        this(32);
   22.66 -    }
   22.67 -
   22.68 -    /**
   22.69 -     * Creates a new byte array output stream, with a buffer capacity of
   22.70 -     * the specified size, in bytes.
   22.71 -     *
   22.72 -     * @param   size   the initial size.
   22.73 -     * @exception  IllegalArgumentException if size is negative.
   22.74 -     */
   22.75 -    public ByteArrayOutputStream(int size) {
   22.76 -        if (size < 0) {
   22.77 -            throw new IllegalArgumentException("Negative initial size: "
   22.78 -                                               + size);
   22.79 -        }
   22.80 -        buf = new byte[size];
   22.81 -    }
   22.82 -
   22.83 -    /**
   22.84 -     * Increases the capacity if necessary to ensure that it can hold
   22.85 -     * at least the number of elements specified by the minimum
   22.86 -     * capacity argument.
   22.87 -     *
   22.88 -     * @param minCapacity the desired minimum capacity
   22.89 -     * @throws OutOfMemoryError if {@code minCapacity < 0}.  This is
   22.90 -     * interpreted as a request for the unsatisfiably large capacity
   22.91 -     * {@code (long) Integer.MAX_VALUE + (minCapacity - Integer.MAX_VALUE)}.
   22.92 -     */
   22.93 -    private void ensureCapacity(int minCapacity) {
   22.94 -        // overflow-conscious code
   22.95 -        if (minCapacity - buf.length > 0)
   22.96 -            grow(minCapacity);
   22.97 -    }
   22.98 -
   22.99 -    /**
  22.100 -     * Increases the capacity to ensure that it can hold at least the
  22.101 -     * number of elements specified by the minimum capacity argument.
  22.102 -     *
  22.103 -     * @param minCapacity the desired minimum capacity
  22.104 -     */
  22.105 -    private void grow(int minCapacity) {
  22.106 -        // overflow-conscious code
  22.107 -        int oldCapacity = buf.length;
  22.108 -        int newCapacity = oldCapacity << 1;
  22.109 -        if (newCapacity - minCapacity < 0)
  22.110 -            newCapacity = minCapacity;
  22.111 -        if (newCapacity < 0) {
  22.112 -            if (minCapacity < 0) // overflow
  22.113 -                throw new OutOfMemoryError();
  22.114 -            newCapacity = Integer.MAX_VALUE;
  22.115 -        }
  22.116 -        buf = Arrays.copyOf(buf, newCapacity);
  22.117 -    }
  22.118 -
  22.119 -    /**
  22.120 -     * Writes the specified byte to this byte array output stream.
  22.121 -     *
  22.122 -     * @param   b   the byte to be written.
  22.123 -     */
  22.124 -    public synchronized void write(int b) {
  22.125 -        ensureCapacity(count + 1);
  22.126 -        buf[count] = (byte) b;
  22.127 -        count += 1;
  22.128 -    }
  22.129 -
  22.130 -    /**
  22.131 -     * Writes <code>len</code> bytes from the specified byte array
  22.132 -     * starting at offset <code>off</code> to this byte array output stream.
  22.133 -     *
  22.134 -     * @param   b     the data.
  22.135 -     * @param   off   the start offset in the data.
  22.136 -     * @param   len   the number of bytes to write.
  22.137 -     */
  22.138 -    public synchronized void write(byte b[], int off, int len) {
  22.139 -        if ((off < 0) || (off > b.length) || (len < 0) ||
  22.140 -            ((off + len) - b.length > 0)) {
  22.141 -            throw new IndexOutOfBoundsException();
  22.142 -        }
  22.143 -        ensureCapacity(count + len);
  22.144 -        System.arraycopy(b, off, buf, count, len);
  22.145 -        count += len;
  22.146 -    }
  22.147 -
  22.148 -    /**
  22.149 -     * Writes the complete contents of this byte array output stream to
  22.150 -     * the specified output stream argument, as if by calling the output
  22.151 -     * stream's write method using <code>out.write(buf, 0, count)</code>.
  22.152 -     *
  22.153 -     * @param      out   the output stream to which to write the data.
  22.154 -     * @exception  IOException  if an I/O error occurs.
  22.155 -     */
  22.156 -    public synchronized void writeTo(OutputStream out) throws IOException {
  22.157 -        out.write(buf, 0, count);
  22.158 -    }
  22.159 -
  22.160 -    /**
  22.161 -     * Resets the <code>count</code> field of this byte array output
  22.162 -     * stream to zero, so that all currently accumulated output in the
  22.163 -     * output stream is discarded. The output stream can be used again,
  22.164 -     * reusing the already allocated buffer space.
  22.165 -     *
  22.166 -     * @see     java.io.ByteArrayInputStream#count
  22.167 -     */
  22.168 -    public synchronized void reset() {
  22.169 -        count = 0;
  22.170 -    }
  22.171 -
  22.172 -    /**
  22.173 -     * Creates a newly allocated byte array. Its size is the current
  22.174 -     * size of this output stream and the valid contents of the buffer
  22.175 -     * have been copied into it.
  22.176 -     *
  22.177 -     * @return  the current contents of this output stream, as a byte array.
  22.178 -     * @see     java.io.ByteArrayOutputStream#size()
  22.179 -     */
  22.180 -    public synchronized byte toByteArray()[] {
  22.181 -        return Arrays.copyOf(buf, count);
  22.182 -    }
  22.183 -
  22.184 -    /**
  22.185 -     * Returns the current size of the buffer.
  22.186 -     *
  22.187 -     * @return  the value of the <code>count</code> field, which is the number
  22.188 -     *          of valid bytes in this output stream.
  22.189 -     * @see     java.io.ByteArrayOutputStream#count
  22.190 -     */
  22.191 -    public synchronized int size() {
  22.192 -        return count;
  22.193 -    }
  22.194 -
  22.195 -    /**
  22.196 -     * Converts the buffer's contents into a string decoding bytes using the
  22.197 -     * platform's default character set. The length of the new <tt>String</tt>
  22.198 -     * is a function of the character set, and hence may not be equal to the
  22.199 -     * size of the buffer.
  22.200 -     *
  22.201 -     * <p> This method always replaces malformed-input and unmappable-character
  22.202 -     * sequences with the default replacement string for the platform's
  22.203 -     * default character set. The {@linkplain java.nio.charset.CharsetDecoder}
  22.204 -     * class should be used when more control over the decoding process is
  22.205 -     * required.
  22.206 -     *
  22.207 -     * @return String decoded from the buffer's contents.
  22.208 -     * @since  JDK1.1
  22.209 -     */
  22.210 -    public synchronized String toString() {
  22.211 -        return new String(buf, 0, count);
  22.212 -    }
  22.213 -
  22.214 -    /**
  22.215 -     * Converts the buffer's contents into a string by decoding the bytes using
  22.216 -     * the specified {@link java.nio.charset.Charset charsetName}. The length of
  22.217 -     * the new <tt>String</tt> is a function of the charset, and hence may not be
  22.218 -     * equal to the length of the byte array.
  22.219 -     *
  22.220 -     * <p> This method always replaces malformed-input and unmappable-character
  22.221 -     * sequences with this charset's default replacement string. The {@link
  22.222 -     * java.nio.charset.CharsetDecoder} class should be used when more control
  22.223 -     * over the decoding process is required.
  22.224 -     *
  22.225 -     * @param  charsetName  the name of a supported
  22.226 -     *              {@linkplain java.nio.charset.Charset </code>charset<code>}
  22.227 -     * @return String decoded from the buffer's contents.
  22.228 -     * @exception  UnsupportedEncodingException
  22.229 -     *             If the named charset is not supported
  22.230 -     * @since   JDK1.1
  22.231 -     */
  22.232 -    public synchronized String toString(String charsetName)
  22.233 -        throws UnsupportedEncodingException
  22.234 -    {
  22.235 -        return new String(buf, 0, count, charsetName);
  22.236 -    }
  22.237 -
  22.238 -    /**
  22.239 -     * Creates a newly allocated string. Its size is the current size of
  22.240 -     * the output stream and the valid contents of the buffer have been
  22.241 -     * copied into it. Each character <i>c</i> in the resulting string is
  22.242 -     * constructed from the corresponding element <i>b</i> in the byte
  22.243 -     * array such that:
  22.244 -     * <blockquote><pre>
  22.245 -     *     c == (char)(((hibyte &amp; 0xff) &lt;&lt; 8) | (b &amp; 0xff))
  22.246 -     * </pre></blockquote>
  22.247 -     *
  22.248 -     * @deprecated This method does not properly convert bytes into characters.
  22.249 -     * As of JDK&nbsp;1.1, the preferred way to do this is via the
  22.250 -     * <code>toString(String enc)</code> method, which takes an encoding-name
  22.251 -     * argument, or the <code>toString()</code> method, which uses the
  22.252 -     * platform's default character encoding.
  22.253 -     *
  22.254 -     * @param      hibyte    the high byte of each resulting Unicode character.
  22.255 -     * @return     the current contents of the output stream, as a string.
  22.256 -     * @see        java.io.ByteArrayOutputStream#size()
  22.257 -     * @see        java.io.ByteArrayOutputStream#toString(String)
  22.258 -     * @see        java.io.ByteArrayOutputStream#toString()
  22.259 -     */
  22.260 -    @Deprecated
  22.261 -    public synchronized String toString(int hibyte) {
  22.262 -        return new String(buf, hibyte, 0, count);
  22.263 -    }
  22.264 -
  22.265 -    /**
  22.266 -     * Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in
  22.267 -     * this class can be called after the stream has been closed without
  22.268 -     * generating an <tt>IOException</tt>.
  22.269 -     * <p>
  22.270 -     *
  22.271 -     */
  22.272 -    public void close() throws IOException {
  22.273 -    }
  22.274 -
  22.275 -}
    23.1 --- a/emul/compact/src/main/java/java/io/DataOutput.java	Tue Feb 26 14:55:55 2013 +0100
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,354 +0,0 @@
    23.4 -/*
    23.5 - * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
    23.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    23.7 - *
    23.8 - * This code is free software; you can redistribute it and/or modify it
    23.9 - * under the terms of the GNU General Public License version 2 only, as
   23.10 - * published by the Free Software Foundation.  Oracle designates this
   23.11 - * particular file as subject to the "Classpath" exception as provided
   23.12 - * by Oracle in the LICENSE file that accompanied this code.
   23.13 - *
   23.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   23.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   23.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   23.17 - * version 2 for more details (a copy is included in the LICENSE file that
   23.18 - * accompanied this code).
   23.19 - *
   23.20 - * You should have received a copy of the GNU General Public License version
   23.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   23.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   23.23 - *
   23.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   23.25 - * or visit www.oracle.com if you need additional information or have any
   23.26 - * questions.
   23.27 - */
   23.28 -
   23.29 -package java.io;
   23.30 -
   23.31 -/**
   23.32 - * The <code>DataOutput</code> interface provides
   23.33 - * for converting data from any of the Java
   23.34 - * primitive types to a series of bytes and
   23.35 - * writing these bytes to a binary stream.
   23.36 - * There is  also a facility for converting
   23.37 - * a <code>String</code> into
   23.38 - * <a href="DataInput.html#modified-utf-8">modified UTF-8</a>
   23.39 - * format and writing the resulting series
   23.40 - * of bytes.
   23.41 - * <p>
   23.42 - * For all the methods in this interface that
   23.43 - * write bytes, it is generally true that if
   23.44 - * a byte cannot be written for any reason,
   23.45 - * an <code>IOException</code> is thrown.
   23.46 - *
   23.47 - * @author  Frank Yellin
   23.48 - * @see     java.io.DataInput
   23.49 - * @see     java.io.DataOutputStream
   23.50 - * @since   JDK1.0
   23.51 - */
   23.52 -public
   23.53 -interface DataOutput {
   23.54 -    /**
   23.55 -     * Writes to the output stream the eight
   23.56 -     * low-order bits of the argument <code>b</code>.
   23.57 -     * The 24 high-order  bits of <code>b</code>
   23.58 -     * are ignored.
   23.59 -     *
   23.60 -     * @param      b   the byte to be written.
   23.61 -     * @throws     IOException  if an I/O error occurs.
   23.62 -     */
   23.63 -    void write(int b) throws IOException;
   23.64 -
   23.65 -    /**
   23.66 -     * Writes to the output stream all the bytes in array <code>b</code>.
   23.67 -     * If <code>b</code> is <code>null</code>,
   23.68 -     * a <code>NullPointerException</code> is thrown.
   23.69 -     * If <code>b.length</code> is zero, then
   23.70 -     * no bytes are written. Otherwise, the byte
   23.71 -     * <code>b[0]</code> is written first, then
   23.72 -     * <code>b[1]</code>, and so on; the last byte
   23.73 -     * written is <code>b[b.length-1]</code>.
   23.74 -     *
   23.75 -     * @param      b   the data.
   23.76 -     * @throws     IOException  if an I/O error occurs.
   23.77 -     */
   23.78 -    void write(byte b[]) throws IOException;
   23.79 -
   23.80 -    /**
   23.81 -     * Writes <code>len</code> bytes from array
   23.82 -     * <code>b</code>, in order,  to
   23.83 -     * the output stream.  If <code>b</code>
   23.84 -     * is <code>null</code>, a <code>NullPointerException</code>
   23.85 -     * is thrown.  If <code>off</code> is negative,
   23.86 -     * or <code>len</code> is negative, or <code>off+len</code>
   23.87 -     * is greater than the length of the array
   23.88 -     * <code>b</code>, then an <code>IndexOutOfBoundsException</code>
   23.89 -     * is thrown.  If <code>len</code> is zero,
   23.90 -     * then no bytes are written. Otherwise, the
   23.91 -     * byte <code>b[off]</code> is written first,
   23.92 -     * then <code>b[off+1]</code>, and so on; the
   23.93 -     * last byte written is <code>b[off+len-1]</code>.
   23.94 -     *
   23.95 -     * @param      b     the data.
   23.96 -     * @param      off   the start offset in the data.
   23.97 -     * @param      len   the number of bytes to write.
   23.98 -     * @throws     IOException  if an I/O error occurs.
   23.99 -     */
  23.100 -    void write(byte b[], int off, int len) throws IOException;
  23.101 -
  23.102 -    /**
  23.103 -     * Writes a <code>boolean</code> value to this output stream.
  23.104 -     * If the argument <code>v</code>
  23.105 -     * is <code>true</code>, the value <code>(byte)1</code>
  23.106 -     * is written; if <code>v</code> is <code>false</code>,
  23.107 -     * the  value <code>(byte)0</code> is written.
  23.108 -     * The byte written by this method may
  23.109 -     * be read by the <code>readBoolean</code>
  23.110 -     * method of interface <code>DataInput</code>,
  23.111 -     * which will then return a <code>boolean</code>
  23.112 -     * equal to <code>v</code>.
  23.113 -     *
  23.114 -     * @param      v   the boolean to be written.
  23.115 -     * @throws     IOException  if an I/O error occurs.
  23.116 -     */
  23.117 -    void writeBoolean(boolean v) throws IOException;
  23.118 -
  23.119 -    /**
  23.120 -     * Writes to the output stream the eight low-
  23.121 -     * order bits of the argument <code>v</code>.
  23.122 -     * The 24 high-order bits of <code>v</code>
  23.123 -     * are ignored. (This means  that <code>writeByte</code>
  23.124 -     * does exactly the same thing as <code>write</code>
  23.125 -     * for an integer argument.) The byte written
  23.126 -     * by this method may be read by the <code>readByte</code>
  23.127 -     * method of interface <code>DataInput</code>,
  23.128 -     * which will then return a <code>byte</code>
  23.129 -     * equal to <code>(byte)v</code>.
  23.130 -     *
  23.131 -     * @param      v   the byte value to be written.
  23.132 -     * @throws     IOException  if an I/O error occurs.
  23.133 -     */
  23.134 -    void writeByte(int v) throws IOException;
  23.135 -
  23.136 -    /**
  23.137 -     * Writes two bytes to the output
  23.138 -     * stream to represent the value of the argument.
  23.139 -     * The byte values to be written, in the  order
  23.140 -     * shown, are: <p>
  23.141 -     * <pre><code>
  23.142 -     * (byte)(0xff &amp; (v &gt;&gt; 8))
  23.143 -     * (byte)(0xff &amp; v)
  23.144 -     * </code> </pre> <p>
  23.145 -     * The bytes written by this method may be
  23.146 -     * read by the <code>readShort</code> method
  23.147 -     * of interface <code>DataInput</code> , which
  23.148 -     * will then return a <code>short</code> equal
  23.149 -     * to <code>(short)v</code>.
  23.150 -     *
  23.151 -     * @param      v   the <code>short</code> value to be written.
  23.152 -     * @throws     IOException  if an I/O error occurs.
  23.153 -     */
  23.154 -    void writeShort(int v) throws IOException;
  23.155 -
  23.156 -    /**
  23.157 -     * Writes a <code>char</code> value, which
  23.158 -     * is comprised of two bytes, to the
  23.159 -     * output stream.
  23.160 -     * The byte values to be written, in the  order
  23.161 -     * shown, are:
  23.162 -     * <p><pre><code>
  23.163 -     * (byte)(0xff &amp; (v &gt;&gt; 8))
  23.164 -     * (byte)(0xff &amp; v)
  23.165 -     * </code></pre><p>
  23.166 -     * The bytes written by this method may be
  23.167 -     * read by the <code>readChar</code> method
  23.168 -     * of interface <code>DataInput</code> , which
  23.169 -     * will then return a <code>char</code> equal
  23.170 -     * to <code>(char)v</code>.
  23.171 -     *
  23.172 -     * @param      v   the <code>char</code> value to be written.
  23.173 -     * @throws     IOException  if an I/O error occurs.
  23.174 -     */
  23.175 -    void writeChar(int v) throws IOException;
  23.176 -
  23.177 -    /**
  23.178 -     * Writes an <code>int</code> value, which is
  23.179 -     * comprised of four bytes, to the output stream.
  23.180 -     * The byte values to be written, in the  order
  23.181 -     * shown, are:
  23.182 -     * <p><pre><code>
  23.183 -     * (byte)(0xff &amp; (v &gt;&gt; 24))
  23.184 -     * (byte)(0xff &amp; (v &gt;&gt; 16))
  23.185 -     * (byte)(0xff &amp; (v &gt;&gt; &#32; &#32;8))
  23.186 -     * (byte)(0xff &amp; v)
  23.187 -     * </code></pre><p>
  23.188 -     * The bytes written by this method may be read
  23.189 -     * by the <code>readInt</code> method of interface
  23.190 -     * <code>DataInput</code> , which will then
  23.191 -     * return an <code>int</code> equal to <code>v</code>.
  23.192 -     *
  23.193 -     * @param      v   the <code>int</code> value to be written.
  23.194 -     * @throws     IOException  if an I/O error occurs.
  23.195 -     */
  23.196 -    void writeInt(int v) throws IOException;
  23.197 -
  23.198 -    /**
  23.199 -     * Writes a <code>long</code> value, which is
  23.200 -     * comprised of eight bytes, to the output stream.
  23.201 -     * The byte values to be written, in the  order
  23.202 -     * shown, are:
  23.203 -     * <p><pre><code>
  23.204 -     * (byte)(0xff &amp; (v &gt;&gt; 56))
  23.205 -     * (byte)(0xff &amp; (v &gt;&gt; 48))
  23.206 -     * (byte)(0xff &amp; (v &gt;&gt; 40))
  23.207 -     * (byte)(0xff &amp; (v &gt;&gt; 32))
  23.208 -     * (byte)(0xff &amp; (v &gt;&gt; 24))
  23.209 -     * (byte)(0xff &amp; (v &gt;&gt; 16))
  23.210 -     * (byte)(0xff &amp; (v &gt;&gt;  8))
  23.211 -     * (byte)(0xff &amp; v)
  23.212 -     * </code></pre><p>
  23.213 -     * The bytes written by this method may be
  23.214 -     * read by the <code>readLong</code> method
  23.215 -     * of interface <code>DataInput</code> , which
  23.216 -     * will then return a <code>long</code> equal
  23.217 -     * to <code>v</code>.
  23.218 -     *
  23.219 -     * @param      v   the <code>long</code> value to be written.
  23.220 -     * @throws     IOException  if an I/O error occurs.
  23.221 -     */
  23.222 -    void writeLong(long v) throws IOException;
  23.223 -
  23.224 -    /**
  23.225 -     * Writes a <code>float</code> value,
  23.226 -     * which is comprised of four bytes, to the output stream.
  23.227 -     * It does this as if it first converts this
  23.228 -     * <code>float</code> value to an <code>int</code>
  23.229 -     * in exactly the manner of the <code>Float.floatToIntBits</code>
  23.230 -     * method  and then writes the <code>int</code>
  23.231 -     * value in exactly the manner of the  <code>writeInt</code>
  23.232 -     * method.  The bytes written by this method
  23.233 -     * may be read by the <code>readFloat</code>
  23.234 -     * method of interface <code>DataInput</code>,
  23.235 -     * which will then return a <code>float</code>
  23.236 -     * equal to <code>v</code>.
  23.237 -     *
  23.238 -     * @param      v   the <code>float</code> value to be written.
  23.239 -     * @throws     IOException  if an I/O error occurs.
  23.240 -     */
  23.241 -    void writeFloat(float v) throws IOException;
  23.242 -
  23.243 -    /**
  23.244 -     * Writes a <code>double</code> value,
  23.245 -     * which is comprised of eight bytes, to the output stream.
  23.246 -     * It does this as if it first converts this
  23.247 -     * <code>double</code> value to a <code>long</code>
  23.248 -     * in exactly the manner of the <code>Double.doubleToLongBits</code>
  23.249 -     * method  and then writes the <code>long</code>
  23.250 -     * value in exactly the manner of the  <code>writeLong</code>
  23.251 -     * method. The bytes written by this method
  23.252 -     * may be read by the <code>readDouble</code>
  23.253 -     * method of interface <code>DataInput</code>,
  23.254 -     * which will then return a <code>double</code>
  23.255 -     * equal to <code>v</code>.
  23.256 -     *
  23.257 -     * @param      v   the <code>double</code> value to be written.
  23.258 -     * @throws     IOException  if an I/O error occurs.
  23.259 -     */
  23.260 -    void writeDouble(double v) throws IOException;
  23.261 -
  23.262 -    /**
  23.263 -     * Writes a string to the output stream.
  23.264 -     * For every character in the string
  23.265 -     * <code>s</code>,  taken in order, one byte
  23.266 -     * is written to the output stream.  If
  23.267 -     * <code>s</code> is <code>null</code>, a <code>NullPointerException</code>
  23.268 -     * is thrown.<p>  If <code>s.length</code>
  23.269 -     * is zero, then no bytes are written. Otherwise,
  23.270 -     * the character <code>s[0]</code> is written
  23.271 -     * first, then <code>s[1]</code>, and so on;
  23.272 -     * the last character written is <code>s[s.length-1]</code>.
  23.273 -     * For each character, one byte is written,
  23.274 -     * the low-order byte, in exactly the manner
  23.275 -     * of the <code>writeByte</code> method . The
  23.276 -     * high-order eight bits of each character
  23.277 -     * in the string are ignored.
  23.278 -     *
  23.279 -     * @param      s   the string of bytes to be written.
  23.280 -     * @throws     IOException  if an I/O error occurs.
  23.281 -     */
  23.282 -    void writeBytes(String s) throws IOException;
  23.283 -
  23.284 -    /**
  23.285 -     * Writes every character in the string <code>s</code>,
  23.286 -     * to the output stream, in order,
  23.287 -     * two bytes per character. If <code>s</code>
  23.288 -     * is <code>null</code>, a <code>NullPointerException</code>
  23.289 -     * is thrown.  If <code>s.length</code>
  23.290 -     * is zero, then no characters are written.
  23.291 -     * Otherwise, the character <code>s[0]</code>
  23.292 -     * is written first, then <code>s[1]</code>,
  23.293 -     * and so on; the last character written is
  23.294 -     * <code>s[s.length-1]</code>. For each character,
  23.295 -     * two bytes are actually written, high-order
  23.296 -     * byte first, in exactly the manner of the
  23.297 -     * <code>writeChar</code> method.
  23.298 -     *
  23.299 -     * @param      s   the string value to be written.
  23.300 -     * @throws     IOException  if an I/O error occurs.
  23.301 -     */
  23.302 -    void writeChars(String s) throws IOException;
  23.303 -
  23.304 -    /**
  23.305 -     * Writes two bytes of length information
  23.306 -     * to the output stream, followed
  23.307 -     * by the
  23.308 -     * <a href="DataInput.html#modified-utf-8">modified UTF-8</a>
  23.309 -     * representation
  23.310 -     * of  every character in the string <code>s</code>.
  23.311 -     * If <code>s</code> is <code>null</code>,
  23.312 -     * a <code>NullPointerException</code> is thrown.
  23.313 -     * Each character in the string <code>s</code>
  23.314 -     * is converted to a group of one, two, or
  23.315 -     * three bytes, depending on the value of the
  23.316 -     * character.<p>
  23.317 -     * If a character <code>c</code>
  23.318 -     * is in the range <code>&#92;u0001</code> through
  23.319 -     * <code>&#92;u007f</code>, it is represented
  23.320 -     * by one byte:<p>
  23.321 -     * <pre>(byte)c </pre>  <p>
  23.322 -     * If a character <code>c</code> is <code>&#92;u0000</code>
  23.323 -     * or is in the range <code>&#92;u0080</code>
  23.324 -     * through <code>&#92;u07ff</code>, then it is
  23.325 -     * represented by two bytes, to be written
  23.326 -     * in the order shown:<p> <pre><code>
  23.327 -     * (byte)(0xc0 | (0x1f &amp; (c &gt;&gt; 6)))
  23.328 -     * (byte)(0x80 | (0x3f &amp; c))
  23.329 -     *  </code></pre>  <p> If a character
  23.330 -     * <code>c</code> is in the range <code>&#92;u0800</code>
  23.331 -     * through <code>uffff</code>, then it is
  23.332 -     * represented by three bytes, to be written
  23.333 -     * in the order shown:<p> <pre><code>
  23.334 -     * (byte)(0xe0 | (0x0f &amp; (c &gt;&gt; 12)))
  23.335 -     * (byte)(0x80 | (0x3f &amp; (c &gt;&gt;  6)))
  23.336 -     * (byte)(0x80 | (0x3f &amp; c))
  23.337 -     *  </code></pre>  <p> First,
  23.338 -     * the total number of bytes needed to represent
  23.339 -     * all the characters of <code>s</code> is
  23.340 -     * calculated. If this number is larger than
  23.341 -     * <code>65535</code>, then a <code>UTFDataFormatException</code>
  23.342 -     * is thrown. Otherwise, this length is written
  23.343 -     * to the output stream in exactly the manner
  23.344 -     * of the <code>writeShort</code> method;
  23.345 -     * after this, the one-, two-, or three-byte
  23.346 -     * representation of each character in the
  23.347 -     * string <code>s</code> is written.<p>  The
  23.348 -     * bytes written by this method may be read
  23.349 -     * by the <code>readUTF</code> method of interface
  23.350 -     * <code>DataInput</code> , which will then
  23.351 -     * return a <code>String</code> equal to <code>s</code>.
  23.352 -     *
  23.353 -     * @param      s   the string value to be written.
  23.354 -     * @throws     IOException  if an I/O error occurs.
  23.355 -     */
  23.356 -    void writeUTF(String s) throws IOException;
  23.357 -}
    24.1 --- a/emul/compact/src/main/java/java/io/DataOutputStream.java	Tue Feb 26 14:55:55 2013 +0100
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,416 +0,0 @@
    24.4 -/*
    24.5 - * Copyright (c) 1994, 2004, Oracle and/or its affiliates. All rights reserved.
    24.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    24.7 - *
    24.8 - * This code is free software; you can redistribute it and/or modify it
    24.9 - * under the terms of the GNU General Public License version 2 only, as
   24.10 - * published by the Free Software Foundation.  Oracle designates this
   24.11 - * particular file as subject to the "Classpath" exception as provided
   24.12 - * by Oracle in the LICENSE file that accompanied this code.
   24.13 - *
   24.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   24.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   24.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   24.17 - * version 2 for more details (a copy is included in the LICENSE file that
   24.18 - * accompanied this code).
   24.19 - *
   24.20 - * You should have received a copy of the GNU General Public License version
   24.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   24.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   24.23 - *
   24.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   24.25 - * or visit www.oracle.com if you need additional information or have any
   24.26 - * questions.
   24.27 - */
   24.28 -
   24.29 -package java.io;
   24.30 -
   24.31 -/**
   24.32 - * A data output stream lets an application write primitive Java data
   24.33 - * types to an output stream in a portable way. An application can
   24.34 - * then use a data input stream to read the data back in.
   24.35 - *
   24.36 - * @author  unascribed
   24.37 - * @see     java.io.DataInputStream
   24.38 - * @since   JDK1.0
   24.39 - */
   24.40 -public
   24.41 -class DataOutputStream extends FilterOutputStream implements DataOutput {
   24.42 -    /**
   24.43 -     * The number of bytes written to the data output stream so far.
   24.44 -     * If this counter overflows, it will be wrapped to Integer.MAX_VALUE.
   24.45 -     */
   24.46 -    protected int written;
   24.47 -
   24.48 -    /**
   24.49 -     * bytearr is initialized on demand by writeUTF
   24.50 -     */
   24.51 -    private byte[] bytearr = null;
   24.52 -
   24.53 -    /**
   24.54 -     * Creates a new data output stream to write data to the specified
   24.55 -     * underlying output stream. The counter <code>written</code> is
   24.56 -     * set to zero.
   24.57 -     *
   24.58 -     * @param   out   the underlying output stream, to be saved for later
   24.59 -     *                use.
   24.60 -     * @see     java.io.FilterOutputStream#out
   24.61 -     */
   24.62 -    public DataOutputStream(OutputStream out) {
   24.63 -        super(out);
   24.64 -    }
   24.65 -
   24.66 -    /**
   24.67 -     * Increases the written counter by the specified value
   24.68 -     * until it reaches Integer.MAX_VALUE.
   24.69 -     */
   24.70 -    private void incCount(int value) {
   24.71 -        int temp = written + value;
   24.72 -        if (temp < 0) {
   24.73 -            temp = Integer.MAX_VALUE;
   24.74 -        }
   24.75 -        written = temp;
   24.76 -    }
   24.77 -
   24.78 -    /**
   24.79 -     * Writes the specified byte (the low eight bits of the argument
   24.80 -     * <code>b</code>) to the underlying output stream. If no exception
   24.81 -     * is thrown, the counter <code>written</code> is incremented by
   24.82 -     * <code>1</code>.
   24.83 -     * <p>
   24.84 -     * Implements the <code>write</code> method of <code>OutputStream</code>.
   24.85 -     *
   24.86 -     * @param      b   the <code>byte</code> to be written.
   24.87 -     * @exception  IOException  if an I/O error occurs.
   24.88 -     * @see        java.io.FilterOutputStream#out
   24.89 -     */
   24.90 -    public synchronized void write(int b) throws IOException {
   24.91 -        out.write(b);
   24.92 -        incCount(1);
   24.93 -    }
   24.94 -
   24.95 -    /**
   24.96 -     * Writes <code>len</code> bytes from the specified byte array
   24.97 -     * starting at offset <code>off</code> to the underlying output stream.
   24.98 -     * If no exception is thrown, the counter <code>written</code> is
   24.99 -     * incremented by <code>len</code>.
  24.100 -     *
  24.101 -     * @param      b     the data.
  24.102 -     * @param      off   the start offset in the data.
  24.103 -     * @param      len   the number of bytes to write.
  24.104 -     * @exception  IOException  if an I/O error occurs.
  24.105 -     * @see        java.io.FilterOutputStream#out
  24.106 -     */
  24.107 -    public synchronized void write(byte b[], int off, int len)
  24.108 -        throws IOException
  24.109 -    {
  24.110 -        out.write(b, off, len);
  24.111 -        incCount(len);
  24.112 -    }
  24.113 -
  24.114 -    /**
  24.115 -     * Flushes this data output stream. This forces any buffered output
  24.116 -     * bytes to be written out to the stream.
  24.117 -     * <p>
  24.118 -     * The <code>flush</code> method of <code>DataOutputStream</code>
  24.119 -     * calls the <code>flush</code> method of its underlying output stream.
  24.120 -     *
  24.121 -     * @exception  IOException  if an I/O error occurs.
  24.122 -     * @see        java.io.FilterOutputStream#out
  24.123 -     * @see        java.io.OutputStream#flush()
  24.124 -     */
  24.125 -    public void flush() throws IOException {
  24.126 -        out.flush();
  24.127 -    }
  24.128 -
  24.129 -    /**
  24.130 -     * Writes a <code>boolean</code> to the underlying output stream as
  24.131 -     * a 1-byte value. The value <code>true</code> is written out as the
  24.132 -     * value <code>(byte)1</code>; the value <code>false</code> is
  24.133 -     * written out as the value <code>(byte)0</code>. If no exception is
  24.134 -     * thrown, the counter <code>written</code> is incremented by
  24.135 -     * <code>1</code>.
  24.136 -     *
  24.137 -     * @param      v   a <code>boolean</code> value to be written.
  24.138 -     * @exception  IOException  if an I/O error occurs.
  24.139 -     * @see        java.io.FilterOutputStream#out
  24.140 -     */
  24.141 -    public final void writeBoolean(boolean v) throws IOException {
  24.142 -        out.write(v ? 1 : 0);
  24.143 -        incCount(1);
  24.144 -    }
  24.145 -
  24.146 -    /**
  24.147 -     * Writes out a <code>byte</code> to the underlying output stream as
  24.148 -     * a 1-byte value. If no exception is thrown, the counter
  24.149 -     * <code>written</code> is incremented by <code>1</code>.
  24.150 -     *
  24.151 -     * @param      v   a <code>byte</code> value to be written.
  24.152 -     * @exception  IOException  if an I/O error occurs.
  24.153 -     * @see        java.io.FilterOutputStream#out
  24.154 -     */
  24.155 -    public final void writeByte(int v) throws IOException {
  24.156 -        out.write(v);
  24.157 -        incCount(1);
  24.158 -    }
  24.159 -
  24.160 -    /**
  24.161 -     * Writes a <code>short</code> to the underlying output stream as two
  24.162 -     * bytes, high byte first. If no exception is thrown, the counter
  24.163 -     * <code>written</code> is incremented by <code>2</code>.
  24.164 -     *
  24.165 -     * @param      v   a <code>short</code> to be written.
  24.166 -     * @exception  IOException  if an I/O error occurs.
  24.167 -     * @see        java.io.FilterOutputStream#out
  24.168 -     */
  24.169 -    public final void writeShort(int v) throws IOException {
  24.170 -        out.write((v >>> 8) & 0xFF);
  24.171 -        out.write((v >>> 0) & 0xFF);
  24.172 -        incCount(2);
  24.173 -    }
  24.174 -
  24.175 -    /**
  24.176 -     * Writes a <code>char</code> to the underlying output stream as a
  24.177 -     * 2-byte value, high byte first. If no exception is thrown, the
  24.178 -     * counter <code>written</code> is incremented by <code>2</code>.
  24.179 -     *
  24.180 -     * @param      v   a <code>char</code> value to be written.
  24.181 -     * @exception  IOException  if an I/O error occurs.
  24.182 -     * @see        java.io.FilterOutputStream#out
  24.183 -     */
  24.184 -    public final void writeChar(int v) throws IOException {
  24.185 -        out.write((v >>> 8) & 0xFF);
  24.186 -        out.write((v >>> 0) & 0xFF);
  24.187 -        incCount(2);
  24.188 -    }
  24.189 -
  24.190 -    /**
  24.191 -     * Writes an <code>int</code> to the underlying output stream as four
  24.192 -     * bytes, high byte first. If no exception is thrown, the counter
  24.193 -     * <code>written</code> is incremented by <code>4</code>.
  24.194 -     *
  24.195 -     * @param      v   an <code>int</code> to be written.
  24.196 -     * @exception  IOException  if an I/O error occurs.
  24.197 -     * @see        java.io.FilterOutputStream#out
  24.198 -     */
  24.199 -    public final void writeInt(int v) throws IOException {
  24.200 -        out.write((v >>> 24) & 0xFF);
  24.201 -        out.write((v >>> 16) & 0xFF);
  24.202 -        out.write((v >>>  8) & 0xFF);
  24.203 -        out.write((v >>>  0) & 0xFF);
  24.204 -        incCount(4);
  24.205 -    }
  24.206 -
  24.207 -    private byte writeBuffer[] = new byte[8];
  24.208 -
  24.209 -    /**
  24.210 -     * Writes a <code>long</code> to the underlying output stream as eight
  24.211 -     * bytes, high byte first. In no exception is thrown, the counter
  24.212 -     * <code>written</code> is incremented by <code>8</code>.
  24.213 -     *
  24.214 -     * @param      v   a <code>long</code> to be written.
  24.215 -     * @exception  IOException  if an I/O error occurs.
  24.216 -     * @see        java.io.FilterOutputStream#out
  24.217 -     */
  24.218 -    public final void writeLong(long v) throws IOException {
  24.219 -        writeBuffer[0] = (byte)(v >>> 56);
  24.220 -        writeBuffer[1] = (byte)(v >>> 48);
  24.221 -        writeBuffer[2] = (byte)(v >>> 40);
  24.222 -        writeBuffer[3] = (byte)(v >>> 32);
  24.223 -        writeBuffer[4] = (byte)(v >>> 24);
  24.224 -        writeBuffer[5] = (byte)(v >>> 16);
  24.225 -        writeBuffer[6] = (byte)(v >>>  8);
  24.226 -        writeBuffer[7] = (byte)(v >>>  0);
  24.227 -        out.write(writeBuffer, 0, 8);
  24.228 -        incCount(8);
  24.229 -    }
  24.230 -
  24.231 -    /**
  24.232 -     * Converts the float argument to an <code>int</code> using the
  24.233 -     * <code>floatToIntBits</code> method in class <code>Float</code>,
  24.234 -     * and then writes that <code>int</code> value to the underlying
  24.235 -     * output stream as a 4-byte quantity, high byte first. If no
  24.236 -     * exception is thrown, the counter <code>written</code> is
  24.237 -     * incremented by <code>4</code>.
  24.238 -     *
  24.239 -     * @param      v   a <code>float</code> value to be written.
  24.240 -     * @exception  IOException  if an I/O error occurs.
  24.241 -     * @see        java.io.FilterOutputStream#out
  24.242 -     * @see        java.lang.Float#floatToIntBits(float)
  24.243 -     */
  24.244 -    public final void writeFloat(float v) throws IOException {
  24.245 -        writeInt(Float.floatToIntBits(v));
  24.246 -    }
  24.247 -
  24.248 -    /**
  24.249 -     * Converts the double argument to a <code>long</code> using the
  24.250 -     * <code>doubleToLongBits</code> method in class <code>Double</code>,
  24.251 -     * and then writes that <code>long</code> value to the underlying
  24.252 -     * output stream as an 8-byte quantity, high byte first. If no
  24.253 -     * exception is thrown, the counter <code>written</code> is
  24.254 -     * incremented by <code>8</code>.
  24.255 -     *
  24.256 -     * @param      v   a <code>double</code> value to be written.
  24.257 -     * @exception  IOException  if an I/O error occurs.
  24.258 -     * @see        java.io.FilterOutputStream#out
  24.259 -     * @see        java.lang.Double#doubleToLongBits(double)
  24.260 -     */
  24.261 -    public final void writeDouble(double v) throws IOException {
  24.262 -        writeLong(Double.doubleToLongBits(v));
  24.263 -    }
  24.264 -
  24.265 -    /**
  24.266 -     * Writes out the string to the underlying output stream as a
  24.267 -     * sequence of bytes. Each character in the string is written out, in
  24.268 -     * sequence, by discarding its high eight bits. If no exception is
  24.269 -     * thrown, the counter <code>written</code> is incremented by the
  24.270 -     * length of <code>s</code>.
  24.271 -     *
  24.272 -     * @param      s   a string of bytes to be written.
  24.273 -     * @exception  IOException  if an I/O error occurs.
  24.274 -     * @see        java.io.FilterOutputStream#out
  24.275 -     */
  24.276 -    public final void writeBytes(String s) throws IOException {
  24.277 -        int len = s.length();
  24.278 -        for (int i = 0 ; i < len ; i++) {
  24.279 -            out.write((byte)s.charAt(i));
  24.280 -        }
  24.281 -        incCount(len);
  24.282 -    }
  24.283 -
  24.284 -    /**
  24.285 -     * Writes a string to the underlying output stream as a sequence of
  24.286 -     * characters. Each character is written to the data output stream as
  24.287 -     * if by the <code>writeChar</code> method. If no exception is
  24.288 -     * thrown, the counter <code>written</code> is incremented by twice
  24.289 -     * the length of <code>s</code>.
  24.290 -     *
  24.291 -     * @param      s   a <code>String</code> value to be written.
  24.292 -     * @exception  IOException  if an I/O error occurs.
  24.293 -     * @see        java.io.DataOutputStream#writeChar(int)
  24.294 -     * @see        java.io.FilterOutputStream#out
  24.295 -     */
  24.296 -    public final void writeChars(String s) throws IOException {
  24.297 -        int len = s.length();
  24.298 -        for (int i = 0 ; i < len ; i++) {
  24.299 -            int v = s.charAt(i);
  24.300 -            out.write((v >>> 8) & 0xFF);
  24.301 -            out.write((v >>> 0) & 0xFF);
  24.302 -        }
  24.303 -        incCount(len * 2);
  24.304 -    }
  24.305 -
  24.306 -    /**
  24.307 -     * Writes a string to the underlying output stream using
  24.308 -     * <a href="DataInput.html#modified-utf-8">modified UTF-8</a>
  24.309 -     * encoding in a machine-independent manner.
  24.310 -     * <p>
  24.311 -     * First, two bytes are written to the output stream as if by the
  24.312 -     * <code>writeShort</code> method giving the number of bytes to
  24.313 -     * follow. This value is the number of bytes actually written out,
  24.314 -     * not the length of the string. Following the length, each character
  24.315 -     * of the string is output, in sequence, using the modified UTF-8 encoding
  24.316 -     * for the character. If no exception is thrown, the counter
  24.317 -     * <code>written</code> is incremented by the total number of
  24.318 -     * bytes written to the output stream. This will be at least two
  24.319 -     * plus the length of <code>str</code>, and at most two plus
  24.320 -     * thrice the length of <code>str</code>.
  24.321 -     *
  24.322 -     * @param      str   a string to be written.
  24.323 -     * @exception  IOException  if an I/O error occurs.
  24.324 -     */
  24.325 -    public final void writeUTF(String str) throws IOException {
  24.326 -        writeUTF(str, this);
  24.327 -    }
  24.328 -
  24.329 -    /**
  24.330 -     * Writes a string to the specified DataOutput using
  24.331 -     * <a href="DataInput.html#modified-utf-8">modified UTF-8</a>
  24.332 -     * encoding in a machine-independent manner.
  24.333 -     * <p>
  24.334 -     * First, two bytes are written to out as if by the <code>writeShort</code>
  24.335 -     * method giving the number of bytes to follow. This value is the number of
  24.336 -     * bytes actually written out, not the length of the string. Following the
  24.337 -     * length, each character of the string is output, in sequence, using the
  24.338 -     * modified UTF-8 encoding for the character. If no exception is thrown, the
  24.339 -     * counter <code>written</code> is incremented by the total number of
  24.340 -     * bytes written to the output stream. This will be at least two
  24.341 -     * plus the length of <code>str</code>, and at most two plus
  24.342 -     * thrice the length of <code>str</code>.
  24.343 -     *
  24.344 -     * @param      str   a string to be written.
  24.345 -     * @param      out   destination to write to
  24.346 -     * @return     The number of bytes written out.
  24.347 -     * @exception  IOException  if an I/O error occurs.
  24.348 -     */
  24.349 -    static int writeUTF(String str, DataOutput out) throws IOException {
  24.350 -        int strlen = str.length();
  24.351 -        int utflen = 0;
  24.352 -        int c, count = 0;
  24.353 -
  24.354 -        /* use charAt instead of copying String to char array */
  24.355 -        for (int i = 0; i < strlen; i++) {
  24.356 -            c = str.charAt(i);
  24.357 -            if ((c >= 0x0001) && (c <= 0x007F)) {
  24.358 -                utflen++;
  24.359 -            } else if (c > 0x07FF) {
  24.360 -                utflen += 3;
  24.361 -            } else {
  24.362 -                utflen += 2;
  24.363 -            }
  24.364 -        }
  24.365 -
  24.366 -        if (utflen > 65535)
  24.367 -            throw new UTFDataFormatException(
  24.368 -                "encoded string too long: " + utflen + " bytes");
  24.369 -
  24.370 -        byte[] bytearr = null;
  24.371 -        if (out instanceof DataOutputStream) {
  24.372 -            DataOutputStream dos = (DataOutputStream)out;
  24.373 -            if(dos.bytearr == null || (dos.bytearr.length < (utflen+2)))
  24.374 -                dos.bytearr = new byte[(utflen*2) + 2];
  24.375 -            bytearr = dos.bytearr;
  24.376 -        } else {
  24.377 -            bytearr = new byte[utflen+2];
  24.378 -        }
  24.379 -
  24.380 -        bytearr[count++] = (byte) ((utflen >>> 8) & 0xFF);
  24.381 -        bytearr[count++] = (byte) ((utflen >>> 0) & 0xFF);
  24.382 -
  24.383 -        int i=0;
  24.384 -        for (i=0; i<strlen; i++) {
  24.385 -           c = str.charAt(i);
  24.386 -           if (!((c >= 0x0001) && (c <= 0x007F))) break;
  24.387 -           bytearr[count++] = (byte) c;
  24.388 -        }
  24.389 -
  24.390 -        for (;i < strlen; i++){
  24.391 -            c = str.charAt(i);
  24.392 -            if ((c >= 0x0001) && (c <= 0x007F)) {
  24.393 -                bytearr[count++] = (byte) c;
  24.394 -
  24.395 -            } else if (c > 0x07FF) {
  24.396 -                bytearr[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F));
  24.397 -                bytearr[count++] = (byte) (0x80 | ((c >>  6) & 0x3F));
  24.398 -                bytearr[count++] = (byte) (0x80 | ((c >>  0) & 0x3F));
  24.399 -            } else {
  24.400 -                bytearr[count++] = (byte) (0xC0 | ((c >>  6) & 0x1F));
  24.401 -                bytearr[count++] = (byte) (0x80 | ((c >>  0) & 0x3F));
  24.402 -            }
  24.403 -        }
  24.404 -        out.write(bytearr, 0, utflen+2);
  24.405 -        return utflen + 2;
  24.406 -    }
  24.407 -
  24.408 -    /**
  24.409 -     * Returns the current value of the counter <code>written</code>,
  24.410 -     * the number of bytes written to this data output stream so far.
  24.411 -     * If the counter overflows, it will be wrapped to Integer.MAX_VALUE.
  24.412 -     *
  24.413 -     * @return  the value of the <code>written</code> field.
  24.414 -     * @see     java.io.DataOutputStream#written
  24.415 -     */
  24.416 -    public final int size() {
  24.417 -        return written;
  24.418 -    }
  24.419 -}
    25.1 --- a/emul/compact/src/main/java/java/io/Externalizable.java	Tue Feb 26 14:55:55 2013 +0100
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,97 +0,0 @@
    25.4 -/*
    25.5 - * Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved.
    25.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    25.7 - *
    25.8 - * This code is free software; you can redistribute it and/or modify it
    25.9 - * under the terms of the GNU General Public License version 2 only, as
   25.10 - * published by the Free Software Foundation.  Oracle designates this
   25.11 - * particular file as subject to the "Classpath" exception as provided
   25.12 - * by Oracle in the LICENSE file that accompanied this code.
   25.13 - *
   25.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   25.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   25.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   25.17 - * version 2 for more details (a copy is included in the LICENSE file that
   25.18 - * accompanied this code).
   25.19 - *
   25.20 - * You should have received a copy of the GNU General Public License version
   25.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   25.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   25.23 - *
   25.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   25.25 - * or visit www.oracle.com if you need additional information or have any
   25.26 - * questions.
   25.27 - */
   25.28 -
   25.29 -package java.io;
   25.30 -
   25.31 -import java.io.ObjectOutput;
   25.32 -import java.io.ObjectInput;
   25.33 -
   25.34 -/**
   25.35 - * Only the identity of the class of an Externalizable instance is
   25.36 - * written in the serialization stream and it is the responsibility
   25.37 - * of the class to save and restore the contents of its instances.
   25.38 - *
   25.39 - * The writeExternal and readExternal methods of the Externalizable
   25.40 - * interface are implemented by a class to give the class complete
   25.41 - * control over the format and contents of the stream for an object
   25.42 - * and its supertypes. These methods must explicitly
   25.43 - * coordinate with the supertype to save its state. These methods supersede
   25.44 - * customized implementations of writeObject and readObject methods.<br>
   25.45 - *
   25.46 - * Object Serialization uses the Serializable and Externalizable
   25.47 - * interfaces.  Object persistence mechanisms can use them as well.  Each
   25.48 - * object to be stored is tested for the Externalizable interface. If
   25.49 - * the object supports Externalizable, the writeExternal method is called. If the
   25.50 - * object does not support Externalizable and does implement
   25.51 - * Serializable, the object is saved using
   25.52 - * ObjectOutputStream. <br> When an Externalizable object is
   25.53 - * reconstructed, an instance is created using the public no-arg
   25.54 - * constructor, then the readExternal method called.  Serializable
   25.55 - * objects are restored by reading them from an ObjectInputStream.<br>
   25.56 - *
   25.57 - * An Externalizable instance can designate a substitution object via
   25.58 - * the writeReplace and readResolve methods documented in the Serializable
   25.59 - * interface.<br>
   25.60 - *
   25.61 - * @author  unascribed
   25.62 - * @see java.io.ObjectOutputStream
   25.63 - * @see java.io.ObjectInputStream
   25.64 - * @see java.io.ObjectOutput
   25.65 - * @see java.io.ObjectInput
   25.66 - * @see java.io.Serializable
   25.67 - * @since   JDK1.1
   25.68 - */
   25.69 -public interface Externalizable extends java.io.Serializable {
   25.70 -    /**
   25.71 -     * The object implements the writeExternal method to save its contents
   25.72 -     * by calling the methods of DataOutput for its primitive values or
   25.73 -     * calling the writeObject method of ObjectOutput for objects, strings,
   25.74 -     * and arrays.
   25.75 -     *
   25.76 -     * @serialData Overriding methods should use this tag to describe
   25.77 -     *             the data layout of this Externalizable object.
   25.78 -     *             List the sequence of element types and, if possible,
   25.79 -     *             relate the element to a public/protected field and/or
   25.80 -     *             method of this Externalizable class.
   25.81 -     *
   25.82 -     * @param out the stream to write the object to
   25.83 -     * @exception IOException Includes any I/O exceptions that may occur
   25.84 -     */
   25.85 -    void writeExternal(ObjectOutput out) throws IOException;
   25.86 -
   25.87 -    /**
   25.88 -     * The object implements the readExternal method to restore its
   25.89 -     * contents by calling the methods of DataInput for primitive
   25.90 -     * types and readObject for objects, strings and arrays.  The
   25.91 -     * readExternal method must read the values in the same sequence
   25.92 -     * and with the same types as were written by writeExternal.
   25.93 -     *
   25.94 -     * @param in the stream to read data from in order to restore the object
   25.95 -     * @exception IOException if I/O errors occur
   25.96 -     * @exception ClassNotFoundException If the class for an object being
   25.97 -     *              restored cannot be found.
   25.98 -     */
   25.99 -    void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
  25.100 -}
    26.1 --- a/emul/compact/src/main/java/java/io/FilterOutputStream.java	Tue Feb 26 14:55:55 2013 +0100
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,162 +0,0 @@
    26.4 -/*
    26.5 - * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
    26.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    26.7 - *
    26.8 - * This code is free software; you can redistribute it and/or modify it
    26.9 - * under the terms of the GNU General Public License version 2 only, as
   26.10 - * published by the Free Software Foundation.  Oracle designates this
   26.11 - * particular file as subject to the "Classpath" exception as provided
   26.12 - * by Oracle in the LICENSE file that accompanied this code.
   26.13 - *
   26.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   26.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   26.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   26.17 - * version 2 for more details (a copy is included in the LICENSE file that
   26.18 - * accompanied this code).
   26.19 - *
   26.20 - * You should have received a copy of the GNU General Public License version
   26.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   26.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   26.23 - *
   26.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   26.25 - * or visit www.oracle.com if you need additional information or have any
   26.26 - * questions.
   26.27 - */
   26.28 -
   26.29 -package java.io;
   26.30 -
   26.31 -/**
   26.32 - * This class is the superclass of all classes that filter output
   26.33 - * streams. These streams sit on top of an already existing output
   26.34 - * stream (the <i>underlying</i> output stream) which it uses as its
   26.35 - * basic sink of data, but possibly transforming the data along the
   26.36 - * way or providing additional functionality.
   26.37 - * <p>
   26.38 - * The class <code>FilterOutputStream</code> itself simply overrides
   26.39 - * all methods of <code>OutputStream</code> with versions that pass
   26.40 - * all requests to the underlying output stream. Subclasses of
   26.41 - * <code>FilterOutputStream</code> may further override some of these
   26.42 - * methods as well as provide additional methods and fields.
   26.43 - *
   26.44 - * @author  Jonathan Payne
   26.45 - * @since   JDK1.0
   26.46 - */
   26.47 -public
   26.48 -class FilterOutputStream extends OutputStream {
   26.49 -    /**
   26.50 -     * The underlying output stream to be filtered.
   26.51 -     */
   26.52 -    protected OutputStream out;
   26.53 -
   26.54 -    /**
   26.55 -     * Creates an output stream filter built on top of the specified
   26.56 -     * underlying output stream.
   26.57 -     *
   26.58 -     * @param   out   the underlying output stream to be assigned to
   26.59 -     *                the field <tt>this.out</tt> for later use, or
   26.60 -     *                <code>null</code> if this instance is to be
   26.61 -     *                created without an underlying stream.
   26.62 -     */
   26.63 -    public FilterOutputStream(OutputStream out) {
   26.64 -        this.out = out;
   26.65 -    }
   26.66 -
   26.67 -    /**
   26.68 -     * Writes the specified <code>byte</code> to this output stream.
   26.69 -     * <p>
   26.70 -     * The <code>write</code> method of <code>FilterOutputStream</code>
   26.71 -     * calls the <code>write</code> method of its underlying output stream,
   26.72 -     * that is, it performs <tt>out.write(b)</tt>.
   26.73 -     * <p>
   26.74 -     * Implements the abstract <tt>write</tt> method of <tt>OutputStream</tt>.
   26.75 -     *
   26.76 -     * @param      b   the <code>byte</code>.
   26.77 -     * @exception  IOException  if an I/O error occurs.
   26.78 -     */
   26.79 -    public void write(int b) throws IOException {
   26.80 -        out.write(b);
   26.81 -    }
   26.82 -
   26.83 -    /**
   26.84 -     * Writes <code>b.length</code> bytes to this output stream.
   26.85 -     * <p>
   26.86 -     * The <code>write</code> method of <code>FilterOutputStream</code>
   26.87 -     * calls its <code>write</code> method of three arguments with the
   26.88 -     * arguments <code>b</code>, <code>0</code>, and
   26.89 -     * <code>b.length</code>.
   26.90 -     * <p>
   26.91 -     * Note that this method does not call the one-argument
   26.92 -     * <code>write</code> method of its underlying stream with the single
   26.93 -     * argument <code>b</code>.
   26.94 -     *
   26.95 -     * @param      b   the data to be written.
   26.96 -     * @exception  IOException  if an I/O error occurs.
   26.97 -     * @see        java.io.FilterOutputStream#write(byte[], int, int)
   26.98 -     */
   26.99 -    public void write(byte b[]) throws IOException {
  26.100 -        write(b, 0, b.length);
  26.101 -    }
  26.102 -
  26.103 -    /**
  26.104 -     * Writes <code>len</code> bytes from the specified
  26.105 -     * <code>byte</code> array starting at offset <code>off</code> to
  26.106 -