throw new BufferDataException( "fieldSize is not even for a UTF-16 string.");
throw new BufferDataException("fieldSize is not even for a UTF-16 string.");
throw new BufferDataException( "fieldSize is not even for a UTF-16 string.");
throw new BufferDataException("Object length should be greater than 4: " + length); return in.readObject(); } catch (IOException e) { throw new BufferDataException(e); } finally { limit(oldLimit);
throw new BufferDataException("fieldSize is not even for a UTF-16 string.");
throw new BufferDataException( "Object length should be greater than 4: " + length); return in.readObject(); } catch (IOException e) { throw new BufferDataException(e); } finally { limit(oldLimit);
out.flush(); } catch (IOException e) { throw new BufferDataException(e);
out.flush(); } catch (IOException e) { throw new BufferDataException(e);
out.flush(); } catch (IOException e) { throw new BufferDataException(e);
throw new BufferDataException( "Object length should be greater than 4: " + length); return in.readObject(); } catch (IOException e) { throw new BufferDataException(e); } finally { limit(oldLimit);
out.flush(); } catch (IOException e) { throw new BufferDataException(e);
throw new BufferDataException("Object length should be greater than 4: " + length); return in.readObject(); } catch (IOException e) { throw new BufferDataException(e); } finally { limit(oldLimit);
/** * {@inheritDoc} */ @Override public boolean prefixedDataAvailable(int prefixLength, int maxDataLength) { if (remaining() < prefixLength) { return false; } int dataLength; switch (prefixLength) { case 1: dataLength = getUnsigned(position()); break; case 2: dataLength = getUnsignedShort(position()); break; case 4: dataLength = getInt(position()); break; default: throw new IllegalArgumentException("prefixLength: " + prefixLength); } if (dataLength < 0 || dataLength > maxDataLength) { throw new BufferDataException("dataLength: " + dataLength); } return remaining() - prefixLength >= dataLength; }
/** * {@inheritDoc} */ @Override public boolean prefixedDataAvailable(int prefixLength, int maxDataLength) { if (remaining() < prefixLength) { return false; } int dataLength; switch (prefixLength) { case 1: dataLength = getUnsigned(position()); break; case 2: dataLength = getUnsignedShort(position()); break; case 4: dataLength = getInt(position()); break; default: throw new IllegalArgumentException("prefixLength: " + prefixLength); } if (dataLength < 0 || dataLength > maxDataLength) { throw new BufferDataException("dataLength: " + dataLength); } return remaining() - prefixLength >= dataLength; }
/** * {@inheritDoc} */ @Override public boolean prefixedDataAvailable(int prefixLength, int maxDataLength) { if (remaining() < prefixLength) { return false; } int dataLength; switch (prefixLength) { case 1: dataLength = getUnsigned(position()); break; case 2: dataLength = getUnsignedShort(position()); break; case 4: dataLength = getInt(position()); break; default: throw new IllegalArgumentException("prefixLength: " + prefixLength); } if (dataLength < 0 || dataLength > maxDataLength) { throw new BufferDataException("dataLength: " + dataLength); } return remaining() - prefixLength >= dataLength; }
/** * {@inheritDoc} */ @Override public boolean prefixedDataAvailable(int prefixLength, int maxDataLength) { if (remaining() < prefixLength) { return false; } int dataLength; switch (prefixLength) { case 1: dataLength = getUnsigned(position()); break; case 2: dataLength = getUnsignedShort(position()); break; case 4: dataLength = getInt(position()); break; default: throw new IllegalArgumentException("prefixLength: " + prefixLength); } if (dataLength < 0 || dataLength > maxDataLength) { throw new BufferDataException("dataLength: " + dataLength); } return remaining() - prefixLength >= dataLength; }