Flushes the binary output stream, padding 0s if number of bits written so far is not a multiple of 8.
()
| 162 | * is not a multiple of 8. |
| 163 | */ |
| 164 | public void flush() { |
| 165 | clearBuffer(); |
| 166 | try { |
| 167 | out.flush(); |
| 168 | } |
| 169 | catch (IOException e) { |
| 170 | e.printStackTrace(); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * Flushes and closes the binary output stream. |