mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Retain smack-core API
This commit is contained in:
parent
cb18056613
commit
2288825b1c
4 changed files with 45 additions and 0 deletions
|
@ -280,6 +280,16 @@ public final class SmackConfiguration {
|
|||
compressionHandlers.add(xmppInputOutputStream);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get compression handlers.
|
||||
*
|
||||
* @deprecated use {@link #getCompressionHandlers()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static List<XMPPInputOutputStream> getCompresionHandlers() {
|
||||
return getCompressionHandlers();
|
||||
}
|
||||
|
||||
public static List<XMPPInputOutputStream> getCompressionHandlers() {
|
||||
List<XMPPInputOutputStream> res = new ArrayList<>(compressionHandlers.size());
|
||||
for (XMPPInputOutputStream ios : compressionHandlers) {
|
||||
|
|
|
@ -215,6 +215,14 @@ public abstract class IQ extends Stanza {
|
|||
*/
|
||||
protected abstract IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml);
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #initializeAsResultFor(IQ)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
protected final void initialzeAsResultFor(IQ request) {
|
||||
initializeAsResultFor(request);
|
||||
}
|
||||
|
||||
protected final void initializeAsResultFor(IQ request) {
|
||||
if (!(request.getType() == Type.get || request.getType() == Type.set)) {
|
||||
throw new IllegalArgumentException(
|
||||
|
|
|
@ -17,6 +17,17 @@
|
|||
package org.jivesoftware.smack.util;
|
||||
|
||||
public class ByteUtils {
|
||||
|
||||
/**
|
||||
* Concatenate two byte arrays.
|
||||
*
|
||||
* @deprecated use {@link #concat(byte[], byte[])} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static byte[] concact(byte[] arrayOne, byte[] arrayTwo) {
|
||||
return concat(arrayOne, arrayTwo);
|
||||
}
|
||||
|
||||
public static byte[] concat(byte[] arrayOne, byte[] arrayTwo) {
|
||||
int combinedLength = arrayOne.length + arrayTwo.length;
|
||||
byte[] res = new byte[combinedLength];
|
||||
|
|
|
@ -22,6 +22,22 @@ import org.jivesoftware.smack.packet.ExtensionElement;
|
|||
|
||||
public class PacketUtil {
|
||||
|
||||
/**
|
||||
* Get a extension element from a collection.
|
||||
* @param collection
|
||||
* @param element
|
||||
* @param namespace
|
||||
* @param <PE>
|
||||
* @return the extension element
|
||||
* @deprecated use {@link #extensionElementFrom(Collection, String, String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static <PE extends ExtensionElement> PE packetExtensionfromCollection(
|
||||
Collection<ExtensionElement> collection, String element,
|
||||
String namespace) {
|
||||
return extensionElementFrom(collection, element, namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a extension element from a collection.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue