Added deprecated warnings where appropriate

This commit is contained in:
nathan 2019-06-14 10:56:28 +02:00
parent 4e0e95fb44
commit c697643562
2 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,7 @@ class ByteBufInput extends Input {
/** Throws {@link UnsupportedOperationException} because this input uses a ByteBuffer, not a byte[]. /** Throws {@link UnsupportedOperationException} because this input uses a ByteBuffer, not a byte[].
* @deprecated * @deprecated
* @see #getByteBuf() */ * @see #getByteBuf() */
@Deprecated
public byte[] getBuffer () { public byte[] getBuffer () {
throw new UnsupportedOperationException("This input does not used a byte[], see #getByteBuf()."); throw new UnsupportedOperationException("This input does not used a byte[], see #getByteBuf().");
} }
@ -126,6 +127,7 @@ class ByteBufInput extends Input {
/** Throws {@link UnsupportedOperationException} because this input uses a ByteBuffer, not a byte[]. /** Throws {@link UnsupportedOperationException} because this input uses a ByteBuffer, not a byte[].
* @deprecated * @deprecated
* @see #setBuffer(ByteBuf) */ * @see #setBuffer(ByteBuf) */
@Deprecated
public void setBuffer (byte[] bytes) { public void setBuffer (byte[] bytes) {
throw new UnsupportedOperationException("This input does not used a byte[], see #setByteBuf(ByteBuf)."); throw new UnsupportedOperationException("This input does not used a byte[], see #setByteBuf(ByteBuf).");
} }
@ -133,6 +135,7 @@ class ByteBufInput extends Input {
/** Throws {@link UnsupportedOperationException} because this input uses a ByteBuffer, not a byte[]. /** Throws {@link UnsupportedOperationException} because this input uses a ByteBuffer, not a byte[].
* @deprecated * @deprecated
* @see #setBuffer(ByteBuf) */ * @see #setBuffer(ByteBuf) */
@Deprecated
public void setBuffer (byte[] bytes, int offset, int count) { public void setBuffer (byte[] bytes, int offset, int count) {
throw new UnsupportedOperationException("This input does not used a byte[], see #setByteBuf()."); throw new UnsupportedOperationException("This input does not used a byte[], see #setByteBuf().");
} }

View File

@ -124,6 +124,7 @@ public class ByteBufOutput extends Output {
/** Throws {@link UnsupportedOperationException} because this output uses a ByteBuffer, not a byte[]. /** Throws {@link UnsupportedOperationException} because this output uses a ByteBuffer, not a byte[].
* @deprecated * @deprecated
* @see #getByteBuf() */ * @see #getByteBuf() */
@Deprecated
public byte[] getBuffer () { public byte[] getBuffer () {
throw new UnsupportedOperationException("This buffer does not used a byte[], see #getByteBuffer()."); throw new UnsupportedOperationException("This buffer does not used a byte[], see #getByteBuffer().");
} }
@ -131,6 +132,7 @@ public class ByteBufOutput extends Output {
/** Throws {@link UnsupportedOperationException} because this output uses a ByteBuffer, not a byte[]. /** Throws {@link UnsupportedOperationException} because this output uses a ByteBuffer, not a byte[].
* @deprecated * @deprecated
* @see #getByteBuf() */ * @see #getByteBuf() */
@Deprecated
public void setBuffer (byte[] buffer) { public void setBuffer (byte[] buffer) {
throw new UnsupportedOperationException("This buffer does not used a byte[], see #setByteBuffer(ByteBuffer)."); throw new UnsupportedOperationException("This buffer does not used a byte[], see #setByteBuffer(ByteBuffer).");
} }
@ -138,6 +140,7 @@ public class ByteBufOutput extends Output {
/** Throws {@link UnsupportedOperationException} because this output uses a ByteBuffer, not a byte[]. /** Throws {@link UnsupportedOperationException} because this output uses a ByteBuffer, not a byte[].
* @deprecated * @deprecated
* @see #getByteBuf() */ * @see #getByteBuf() */
@Deprecated
public void setBuffer (byte[] buffer, int maxBufferSize) { public void setBuffer (byte[] buffer, int maxBufferSize) {
throw new UnsupportedOperationException("This buffer does not used a byte[], see #setByteBuffer(ByteBuffer)."); throw new UnsupportedOperationException("This buffer does not used a byte[], see #setByteBuffer(ByteBuffer).");
} }