Changeset 4124
- Timestamp:
- 09/29/03 14:23:52 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/Lisp.java
r4116 r4124 3 3 * 4 4 * Copyright (C) 2002-2003 Peter Graves 5 * $Id: Lisp.java,v 1.15 6 2003-09-28 20:13:26piso Exp $5 * $Id: Lisp.java,v 1.157 2003-09-29 14:23:52 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 790 790 return (CharacterOutputStream) out; 791 791 } 792 throw new ConditionThrowable(new TypeError(obj, "output stream")); 792 throw new ConditionThrowable(new TypeError(obj, "character output stream")); 793 } 794 795 public static final BinaryInputStream checkBinaryInputStream(LispObject obj) 796 throws ConditionThrowable 797 { 798 if (obj == null) 799 throw new NullPointerException(); 800 if (obj instanceof BinaryInputStream) 801 return (BinaryInputStream) obj; 802 if (obj instanceof TwoWayStream) { 803 LispInputStream in = ((TwoWayStream)obj).getInputStream(); 804 if (in instanceof BinaryInputStream) 805 return (BinaryInputStream) in; 806 } 807 throw new ConditionThrowable(new TypeError(obj, "binary input stream")); 808 } 809 810 public static final BinaryOutputStream checkBinaryOutputStream(LispObject obj) 811 throws ConditionThrowable 812 { 813 if (obj == null) 814 throw new NullPointerException(); 815 if (obj instanceof BinaryOutputStream) 816 return (BinaryOutputStream) obj; 817 if (obj instanceof TwoWayStream) { 818 LispOutputStream out = ((TwoWayStream)obj).getOutputStream(); 819 if (out instanceof BinaryOutputStream) 820 return (BinaryOutputStream) out; 821 } 822 throw new ConditionThrowable(new TypeError(obj, "binary output stream")); 793 823 } 794 824
Note: See TracChangeset
for help on using the changeset viewer.