@param force repeat pushing until all output is consumed @return true if all encoder output is consumed
(boolean force)
| 146 | * @return true if all encoder output is consumed |
| 147 | */ |
| 148 | boolean pushOutput(boolean force) throws IOException { |
| 149 | while (buffer != null) { |
| 150 | if (buffer.hasRemaining()) { |
| 151 | destination.write(buffer); |
| 152 | } |
| 153 | if (!buffer.hasRemaining()) { |
| 154 | buffer = null; |
| 155 | } else if (!force) { |
| 156 | return false; |
| 157 | } |
| 158 | } |
| 159 | return true; |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | * @return true if there is space in inputBuffer. |