/** Notifies the observers by invoking {@link Observer#data(int)} * with the given arguments. * @param pDataByte Passed to the observers. * @throws IOException Some observer has thrown an exception, which is being * passed down. */ protected void noteDataByte(final int pDataByte) throws IOException { for (final Observer observer : getObservers()) { observer.data(pDataByte); } }
/** Notifies the observers by invoking {@link Observer#data(byte[],int,int)} * with the given arguments. * @param pBuffer Passed to the observers. * @param pOffset Passed to the observers. * @param pLength Passed to the observers. * @throws IOException Some observer has thrown an exception, which is being * passed down. */ protected void noteDataBytes(final byte[] pBuffer, final int pOffset, final int pLength) throws IOException { for (final Observer observer : getObservers()) { observer.data(pBuffer, pOffset, pLength); } }
/** Notifies the observers by invoking {@link Observer#data(byte[],int,int)} * with the given arguments. * @param pBuffer Passed to the observers. * @param pOffset Passed to the observers. * @param pLength Passed to the observers. * @throws IOException Some observer has thrown an exception, which is being * passed down. */ protected void noteDataBytes(final byte[] pBuffer, final int pOffset, final int pLength) throws IOException { for (final Observer observer : getObservers()) { observer.data(pBuffer, pOffset, pLength); } }
/** Notifies the observers by invoking {@link Observer#data(int)} * with the given arguments. * @param pDataByte Passed to the observers. * @throws IOException Some observer has thrown an exception, which is being * passed down. */ protected void noteDataByte(final int pDataByte) throws IOException { for (final Observer observer : getObservers()) { observer.data(pDataByte); } }
@Override void data(final int pByte) throws IOException { super.data(pByte); lastByteSeen = pByte; }
@Override void data(final byte[] pBuffer, final int pOffset, final int pLength) throws IOException { super.data(pBuffer, pOffset, pLength); buffer = pBuffer; offset = pOffset; length = pLength; } }