This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sys.mulipart; | |
public class ContentResponse { | |
private String type; | |
private byte[] content; | |
private String fileName; | |
public ContentResponse() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Barco-Flask is a simple segment push project which process file and store into local directory. | |
----------------------------------------------------------------------------------------------- | |
Project Step | |
----------------------------------------------------------------------------------------------- | |
Detail | |
----------------------------------------------------------------------------------------------- | |
1) expose 1 endpoint which get json request with post method | |
2) parse detail and verify is valid json or not | |
3) get the bucket name and key from the request bz json is bucket object | |
4) create a mysql db and add table push_segment detail and insert data related to the segment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ballistic; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class ExceptionUtil { | |
public static Throwable getRootCause(final Throwable throwable) { | |
final List<Throwable> list = getThrowableList(throwable); | |
Throwable rootCause = list.size() < 2 ? null : (Throwable) list.get(list.size() - 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ballistic.gzip; | |
import java.io.*; | |
import javax.servlet.*; | |
import javax.servlet.http.*; | |
public class GZIPFilter implements Filter { | |
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { | |
if(req instanceof HttpServletRequest) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.fire.stream; | |
import org.apache.commons.net.ftp.FTP; | |
import org.apache.commons.net.ftp.FTPReply; | |
import org.apache.commons.net.ftp.FTPSClient; | |
import javax.net.ssl.*; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class Main { | |
private final static String NON = "NON"; | |
private final static String VIDEO = "VIDEO"; | |
private final static String BANNER = "BANNER"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ballistic.velocity.config; | |
import com.ballistic.velocity.email.EmailManager; | |
import com.ballistic.velocity.gzip.GZIPFilter; | |
import com.ballistic.velocity.velocity.TemplateFactory; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; | |
import org.springframework.boot.web.servlet.FilterRegistrationBean; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ballistic.firestream.db; | |
import com.mongodb.MongoClient; | |
import com.mongodb.MongoClientOptions; | |
import com.mongodb.ReadPreference; | |
import org.mongodb.morphia.Datastore; | |
import org.mongodb.morphia.Morphia; | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ballistic.kafka.broker; | |
import com.ballistic.kafka.mongdb.DbConnection; | |
import com.ballistic.kafka.mongdb.DeviceDAO; | |
import com.ballistic.kafka.mongdb.DeviceManager; | |
import com.ballistic.kafka.pojo.Device; | |
import com.google.gson.Gson; | |
import com.google.gson.reflect.TypeToken; | |
import org.apache.kafka.clients.consumer.ConsumerRecord; | |
import org.apache.kafka.clients.consumer.ConsumerRecords; |
NewerOlder