()
| 148 | } |
| 149 | |
| 150 | protected void readServerCutText() |
| 151 | { |
| 152 | is.skip(3); |
| 153 | int len = is.readU32(); |
| 154 | |
| 155 | if (len > 256*1024) { |
| 156 | is.skip(len); |
| 157 | vlog.error("Cut text too long ("+len+" bytes) - ignoring"); |
| 158 | return; |
| 159 | } |
| 160 | |
| 161 | ByteBuffer buf = ByteBuffer.allocate(len); |
| 162 | is.readBytes(buf, len); |
| 163 | Charset latin1 = Charset.forName("ISO-8859-1"); |
| 164 | CharBuffer chars = latin1.decode(buf.compact()); |
| 165 | handler.serverCutText(chars.toString(), len); |
| 166 | } |
| 167 | |
| 168 | protected void readFence() |
| 169 | { |