< prev index next >

src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 65,74 **** --- 65,75 ---- * * @return the next byte of data, or <code>-1</code> if the end of the * stream is reached. * @exception IOException if an I/O error occurs. */ + @Override public int read() throws IOException { if (spaces > 0) { // We have cached space characters, return one spaces--; return ' ';
*** 148,157 **** --- 149,159 ---- * @return the total number of bytes read into the buffer, or * <code>-1</code> if there is no more data because the end of * the stream has been reached. * @exception IOException if an I/O error occurs. */ + @Override public int read(byte[] buf, int off, int len) throws IOException { int i, c; for (i = 0; i < len; i++) { if ((c = read()) == -1) { if (i == 0) // At end of stream, so we should
*** 165,174 **** --- 167,177 ---- /** * Tests if this input stream supports marks. Currently this class * does not support marks */ + @Override public boolean markSupported() { return false; } /**
*** 176,185 **** --- 179,189 ---- * stream without blocking. The QP algorithm does not permit * a priori knowledge of the number of bytes after decoding, so * this method just invokes the <code>available</code> method * of the original input stream. */ + @Override public int available() throws IOException { // This is bogus ! We don't really know how much // bytes are available *after* decoding return in.available(); }
< prev index next >