< prev index next >

jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.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
*** 76,95 **** --- 76,97 ---- * stream is reached. * @exception IOException if an I/O error occurs. * @see java.io.FilterInputStream#in */ + @Override public int read() throws IOException { if (index >= bufsize) { readPrefix(); if (!decode()) return -1; index = 0; // reset index into buffer } return buffer[index++] & 0xff; // return lower byte } + @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
*** 99,112 **** --- 101,116 ---- buf[off+i] = (byte)c; } return i; } + @Override public boolean markSupported() { return false; } + @Override public int available() throws IOException { // This is only an estimate, since in.available() // might include CRLFs too .. return ((in.available() * 3)/4 + (bufsize-index)); }
< prev index next >