Optimize imports ans renamed RoomTypeConverter

This commit is contained in:
ChronosX88 2019-04-10 19:35:17 +04:00
parent 21d0a98512
commit 22b7950d17
5 changed files with 4 additions and 15 deletions

View File

@ -1,25 +1,17 @@
package io.github.chronosx88.influence.helpers package io.github.chronosx88.influence.helpers
import android.util.Log import android.util.Log
import com.sleepycat.bind.EntryBinding import com.sleepycat.bind.EntryBinding
import com.sleepycat.je.DatabaseEntry import com.sleepycat.je.DatabaseEntry
import io.netty.buffer.Unpooled
import net.tomp2p.connection.SignatureFactory import net.tomp2p.connection.SignatureFactory
import net.tomp2p.storage.AlternativeCompositeByteBuf import net.tomp2p.storage.AlternativeCompositeByteBuf
import net.tomp2p.storage.Data import net.tomp2p.storage.Data
import java.io.*
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.IOException
import java.io.OutputStream
import java.io.Serializable
import java.nio.ByteBuffer import java.nio.ByteBuffer
import java.security.InvalidKeyException import java.security.InvalidKeyException
import java.security.SignatureException import java.security.SignatureException
import io.netty.buffer.Unpooled
class DataSerializerEx(private val signatureFactory: SignatureFactory) : EntryBinding<Data>, Serializable { class DataSerializerEx(private val signatureFactory: SignatureFactory) : EntryBinding<Data>, Serializable {
private val LOG_TAG = "DataSerializerEx" private val LOG_TAG = "DataSerializerEx"

View File

@ -10,7 +10,7 @@ import io.github.chronosx88.influence.models.roomEntities.MessageEntity;
@Database(entities = { MessageEntity.class, ChatEntity.class }, version = 2) @Database(entities = { MessageEntity.class, ChatEntity.class }, version = 2)
@TypeConverters({Converter.class}) @TypeConverters({RoomTypeConverter.class})
public abstract class RoomHelper extends RoomDatabase { public abstract class RoomHelper extends RoomDatabase {
public abstract ChatDao chatDao(); public abstract ChatDao chatDao();
public abstract MessageDao messageDao(); public abstract MessageDao messageDao();

View File

@ -8,7 +8,7 @@ import java.util.ArrayList;
import androidx.room.TypeConverter; import androidx.room.TypeConverter;
public class Converter { public class RoomTypeConverter {
@TypeConverter @TypeConverter
public static ArrayList<String> fromString(String value) { public static ArrayList<String> fromString(String value) {

View File

@ -6,7 +6,6 @@ import com.google.gson.Gson;
import net.tomp2p.dht.PeerDHT; import net.tomp2p.dht.PeerDHT;
import net.tomp2p.peers.Number640; import net.tomp2p.peers.Number640;
import net.tomp2p.peers.PeerAddress;
import net.tomp2p.storage.Data; import net.tomp2p.storage.Data;
import java.io.IOException; import java.io.IOException;

View File

@ -1,7 +1,5 @@
package io.github.chronosx88.influence.models; package io.github.chronosx88.influence.models;
import net.tomp2p.peers.PeerAddress;
import java.io.Serializable; import java.io.Serializable;
/** /**