AsnOutputStream extends OutputStream { public void writeReal(String d, int NR) throws IOException, AsnException { this.writeReal(Tag.CLASS_UNIVERSAL, Tag.REAL, d, NR); } AsnOutputStream(); byte[] toByteArray(); int size(); void reset(); @Override void write( int b ); @Override void write(byte[] b, int off, int len); @Override void write(byte[] b); void writeTag(int tagClass, boolean primitive, int tag); void writeLength(int v); int StartContentDefiniteLength(); int StartContentIndefiniteLength(); void FinalizeContent( int lenPos ); void writeSequence(byte[] data); void writeSequence(int tagClass, int tag, byte[] data); int writeSequenceData(byte[] data); void writeBoolean(boolean value); void writeBoolean(int tagClass, int tag, boolean value); int writeBooleanData(boolean value); void writeInteger(long value); void writeInteger(int tagClass, int tag, long v); int writeIntegerData(long v); void writeReal(String d, int NR); void writeReal(double d); void writeReal(int tagClass, int tag, String d, int NR); void writeReal(int tagClass, int tag, double d); int writeRealData(String d, int NR); int writeRealData(double d); void writeBitString(BitSetStrictLength bitString); void writeBitString(int tagClass, int tag, BitSetStrictLength bitString); int writeBitStringData(BitSetStrictLength bitString); void writeOctetString(byte[] value); void writeOctetString(int tagClass, int tag, byte[] value); int writeOctetStringData(byte[] value); @Deprecated void writeStringOctet(int tagClass, int tag, InputStream io); @Deprecated void writeStringOctet(InputStream io); @Deprecated void writeStringOctetData(InputStream io); void writeNull(); void writeNull(int tagClass, int tag); @Deprecated void writeNULLData(); int writeNullData(); void writeObjectIdentifier(long[] oid); void writeObjectIdentifier(int tagClass, int tag, long[] oid); int writeObjectIdentifierData(long[] oidLeafs); void writeStringUTF8(String data); void writeStringUTF8(int tagClass, int tag, String data); void writeStringUTF8Data(String data); void writeStringIA5(String data); void writeStringIA5(int tagClass, int tag, String data); void writeStringIA5Data(String data); void writeStringGraphic(String data); void writeStringGraphic(int tagClass, int tag, String data); void writeStringGraphicData(String data); @Deprecated void writeStringBinary(BitSet bitString); @Deprecated void writeStringBinary(int tagClass, int tag, BitSet bitString); @Deprecated void writeNULL(); @Deprecated void writeStringBinaryData(BitSet bitString); @Override String toString();  }
@Test public void testReal10_Basic() throws Exception { try { this.output.writeReal("3", BERStatics.REAL_NR1 - 1); fail(); } catch (AsnException asne) { } try { this.output.writeReal("3", BERStatics.REAL_NR3 + 1); fail(); } catch (AsnException asne) { } try { this.output.writeReal("x3", BERStatics.REAL_NR3); fail(); } catch (NumberFormatException e) { } try { this.output.writeReal("3x", BERStatics.REAL_NR3); fail(); } catch (NumberFormatException e) { } }