Organize imports

This commit is contained in:
0xboobface 2018-09-07 15:43:59 +02:00
parent 017a091d84
commit 5df0c25a9d
4 changed files with 45 additions and 54 deletions

View File

@ -2,9 +2,10 @@ package org.taktik.mpegts;
import java.nio.ByteBuffer;
import com.google.common.base.Preconditions;
import org.taktik.ioutils.NIOUtils;
import com.google.common.base.Preconditions;
public class MTSPacket extends PacketSupport {
private boolean transportErrorIndicator; // Transport Error Indicator (TEI)
private boolean payloadUnitStartIndicator; // Payload Unit Start Indicator

View File

@ -1,13 +1,13 @@
package org.taktik.mpegts;
import java.io.File;
import org.taktik.mpegts.sinks.MTSSink;
import org.taktik.mpegts.sinks.UDPTransport;
import org.taktik.mpegts.sources.MTSSource;
import org.taktik.mpegts.sources.MTSSources;
import org.taktik.mpegts.sources.ResettableMTSSource;
import java.io.File;
public class StreamerTest {
public static void main(String[] args) throws Exception {

View File

@ -1,37 +1,33 @@
package org.taktik.mpegts.sources;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.ByteChannel;
import com.google.common.base.Preconditions;
import org.taktik.ioutils.NIOUtils;
import org.taktik.mpegts.Constants;
import org.taktik.mpegts.MTSPacket;
public class ByteChannelMTSSource extends AbstractByteChannelMTSSource<ByteChannel> {
private ByteChannelMTSSource(ByteChannel byteChannel) throws IOException {
super(byteChannel);
}
private ByteChannelMTSSource(ByteChannel byteChannel) throws IOException {
super(byteChannel);
}
public static ByteChannelMTSSourceBuilder builder() {
return new ByteChannelMTSSourceBuilder();
}
public static ByteChannelMTSSourceBuilder builder() {
return new ByteChannelMTSSourceBuilder();
}
public static class ByteChannelMTSSourceBuilder {
private ByteChannel byteChannel;
public static class ByteChannelMTSSourceBuilder {
private ByteChannel byteChannel;
private ByteChannelMTSSourceBuilder(){}
private ByteChannelMTSSourceBuilder(){}
public ByteChannelMTSSourceBuilder setByteChannel(ByteChannel byteChannel) {
this.byteChannel = byteChannel;
return this;
}
public ByteChannelMTSSourceBuilder setByteChannel(ByteChannel byteChannel) {
this.byteChannel = byteChannel;
return this;
}
public ByteChannelMTSSource build() throws IOException {
Preconditions.checkNotNull(byteChannel, "byteChannel cannot be null");
return new ByteChannelMTSSource(byteChannel);
}
}
public ByteChannelMTSSource build() throws IOException {
Preconditions.checkNotNull(byteChannel, "byteChannel cannot be null");
return new ByteChannelMTSSource(byteChannel);
}
}
}

View File

@ -1,45 +1,39 @@
package org.taktik.mpegts.sources;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.SeekableByteChannel;
import com.google.common.base.Preconditions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.taktik.ioutils.NIOUtils;
import org.taktik.mpegts.Constants;
import org.taktik.mpegts.MTSPacket;
public class SeekableByteChannelMTSSource extends AbstractByteChannelMTSSource<SeekableByteChannel> implements ResettableMTSSource {
private SeekableByteChannelMTSSource(SeekableByteChannel byteChannel) throws IOException {
super(byteChannel);
}
private SeekableByteChannelMTSSource(SeekableByteChannel byteChannel) throws IOException {
super(byteChannel);
}
public static SeekableByteChannelMTSSourceBuilder builder() {
return new SeekableByteChannelMTSSourceBuilder();
}
public static SeekableByteChannelMTSSourceBuilder builder() {
return new SeekableByteChannelMTSSourceBuilder();
}
@Override
public void reset() throws IOException {
byteChannel.position(0);
fillBuffer();
}
@Override
public void reset() throws IOException {
byteChannel.position(0);
fillBuffer();
}
public static class SeekableByteChannelMTSSourceBuilder {
private SeekableByteChannel byteChannel;
public static class SeekableByteChannelMTSSourceBuilder {
private SeekableByteChannel byteChannel;
private SeekableByteChannelMTSSourceBuilder(){}
private SeekableByteChannelMTSSourceBuilder(){}
public SeekableByteChannelMTSSourceBuilder setByteChannel(SeekableByteChannel byteChannel) {
this.byteChannel = byteChannel;
return this;
}
public SeekableByteChannelMTSSourceBuilder setByteChannel(SeekableByteChannel byteChannel) {
this.byteChannel = byteChannel;
return this;
}
public SeekableByteChannelMTSSource build() throws IOException {
Preconditions.checkNotNull(byteChannel, "byteChannel cannot be null");
return new SeekableByteChannelMTSSource(byteChannel);
}
}
public SeekableByteChannelMTSSource build() throws IOException {
Preconditions.checkNotNull(byteChannel, "byteChannel cannot be null");
return new SeekableByteChannelMTSSource(byteChannel);
}
}
}