Changeset 14091
- Timestamp:
- 08/14/12 21:53:16 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Stream.java
r13918 r14091 1690 1690 return NIL; 1691 1691 try { 1692 if (! _charReady()) 1693 return NIL; 1694 1695 int n = _readChar(); 1696 if (n < 0) 1697 return NIL; 1698 1699 _unreadChar(n); 1700 1701 return T; 1692 if (isCharacterInputStream()) { 1693 if (! _charReady()) 1694 return NIL; 1695 1696 int n = _readChar(); 1697 if (n < 0) 1698 return NIL; 1699 1700 _unreadChar(n); 1701 1702 return T; 1703 } else if (isInputStream()) { 1704 if (! _byteReady()) 1705 return NIL; 1706 1707 return T; 1708 } else 1709 return error(new StreamError(this, "Not an input stream")); 1702 1710 } catch (IOException e) { 1703 1711 return error(new StreamError(this, e)); … … 1796 1804 streamNotCharacterInputStream(); 1797 1805 return reader.ready(); 1806 } 1807 1808 protected boolean _byteReady() throws IOException { 1809 if (in == null) 1810 streamNotInputStream(); 1811 return (in.available() != 0); 1798 1812 } 1799 1813
Note: See TracChangeset
for help on using the changeset viewer.