code stringlengths 3 1.18M | language stringclasses 1
value |
|---|---|
package com.ch_linghu.fanfoudroid.data2;
import java.util.Date;
public class Status {
private Date created_at;
private String id;
private String text;
private String source;
private boolean truncated;
private String in_reply_to_status_id;
private String in_reply_to_user_id;
privat... | Java |
package com.ch_linghu.fanfoudroid.data2;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
public class DataUtils {
static SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", Locale.US);
pub... | Java |
package com.ch_linghu.fanfoudroid.data2;
import java.util.Date;
public class User {
private String id;
private String name;
private String screen_name;
private String location;
private String desription;
private String profile_image_url;
private String url;
private boolean isProtected;... | Java |
package com.ch_linghu.fanfoudroid.data2;
public class Photo {
private String thumburl;
private String imageurl;
private String largeurl;
public Photo() {}
public String getThumburl() {
return thumburl;
}
public void setThumburl(String thumburl) {
this.thumburl = thumb... | Java |
package com.ch_linghu.fanfoudroid;
import java.util.ArrayList;
import java.util.List;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.ListView;
import android.widget.TextView;
import com.ch_linghu.fanfoudroid.data.Tweet;
import com.ch_linghu.fanfoud... | Java |
/*
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
* UserObjectWapper.java created on 2010-7-28 上午08:48:35 by bwl (Liu Daoru)
*/
package com.ch_linghu.fanfoudroid.fanfou;
import java.io.Serializable;
import java.util.List;
/**
* 对User对象列表进行的包装,以支持cursor相关信息传递
* @author liudaoru - daoru at sina.com.cn
*/
public class UserWapper implements Seriali... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
package com.ch_linghu.fanfoudroid.fanfou;
/**
* An exception class that will be thrown when WeiboAPI calls are failed.<br>
* In case the Fanfou server returned HTTP error code, you can get the HTTP status code using getStatusCode() method.
*/
public class WeiboException extends Exception {
private int statusCod... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following dis... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
/*
Copyright (c) 2007-2009, Yusuke Yamamoto
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | Java |
package com.ch_linghu.fanfoudroid;
import java.util.ArrayList;
import java.util.List;
import android.database.Cursor;
import android.os.Bundle;
import com.ch_linghu.fanfoudroid.data.Tweet;
import com.ch_linghu.fanfoudroid.db.StatusTable;
import com.ch_linghu.fanfoudroid.fanfou.Status;
import com.ch_linghu.fanfoudroi... | Java |
/*
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Java |
package com.ch_linghu.fanfoudroid;
import com.ch_linghu.fanfoudroid.app.Preferences;
import android.app.Activity;
import android.content.ComponentName;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundl... | Java |
package com.ch_linghu.fanfoudroid;
import java.util.HashSet;
//import org.acra.ReportingInteractionMode;
//import org.acra.annotation.ReportsCrashes;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.net... | Java |
package com.ch_linghu.fanfoudroid.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import android.t... | Java |
package com.ch_linghu.fanfoudroid.util;
import java.io.InputStream;
import java.io.OutputStream;
public class StreamUtils {
public static void CopyStream(InputStream is, OutputStream os)
{
final int buffer_size=1024;
try
{
byte[] bytes=new byte[buffer_size];
... | Java |
package com.ch_linghu.fanfoudroid.util;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Arrays;
import java.util.HashMap;
import android.util.Log;
import com.ch_linghu.fanfoudroid.TwitterApplication;
/**
* Debug Timer
*
* Usage:
* --------------------------------
* DebugTimer.s... | Java |
package com.ch_linghu.fanfoudroid.util;
import java.io.File;
import java.io.IOException;
import android.os.Environment;
/**
* 对SD卡文件的管理
* @author ch.linghu
*
*/
public class FileHelper {
private static final String TAG = "FileHelper";
private static final String BASE_PATH="fanfoudroid";
public st... | Java |
package com.ch_linghu.fanfoudroid.util;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import android.util.Log;
import com.ch_linghu.fanfoudroid.R;
import com.ch_linghu.fanfoudroid.TwitterAppl... | Java |
/***
Copyright (c) 2008-2009 CommonsWare, LLC
Portions (c) 2009 Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by ap... | Java |
/***
Copyright (c) 2008-2009 CommonsWare, LLC
Portions (c) 2009 Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by ap... | Java |
package com.hlidskialf.android.hardware;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
public class ShakeListener implements SensorEventListener {
private static final int FORCE... | Java |
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.DigitalIOButton;
/**
* This class is the glue that binds the controls on the physical operator
* interface to the commands and command groups th... | Java |
package edu.wpi.first.wpilibj.templates;
/**
* The RobotMap is a mapping from the ports sensors and actuators are wired into
* to a variable name. This provides flexibility changing wiring, makes checking
* the wiring easier and significantly reduces the number of magic numbers
* floating around.
*/
publi... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.commands;
import edu.wpi.first.wpilibj.templates.OI;
import edu.wpi.first.wpilibj.templates.commands.CommandBase;
/**
*
* @author Roksbot
*/
public class DriveWit... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.commands;
/**
*
* @author Roksbot
*/
public class DriveForward extends CommandBase {
private static double TIME,
SPEED;
public DriveFor... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.commands;
/**
*
* @author Roksbot
*/
public class TurnLeft extends CommandBase {
private static double SPEED,
TARGET_ANGLE;
private static bool... | Java |
package edu.wpi.first.wpilibj.templates.commands;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.templates.OI;
import edu.wpi.first.wpilibj.templates.subsystems.DriveTrain;
import edu.wpi.first.wpilibj.templates.subsystems.Gy... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.commands;
/**
*
* @author Roksbot
*/
public class GyroReturnAngle extends CommandBase {
public GyroReturnAngle() {
requires(cb_GYRO);
}
... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.commands;
/**
*
* @author Roksbot
*/
public class StrafeRight extends CommandBase {
private static double SPEED;
public StrafeRight(double speed, double tim... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.commands;
/**
*
* @author Roksbot
*/
public class StrafeLeft extends CommandBase {
private static double SPEED;
public StrafeLeft(double speed, double time)... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.commands;
/**
*
* @author Roksbot
*/
public class DriveBackward extends CommandBase {
private static double SPEED;
public DriveBackward(double time, double ... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.commands;
/**
*
* @author Roksbot
*/
public class TurnRight extends CommandBase {
private static double SPEED,
TARGET_ANGLE;
private static boo... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.subsystems;
import edu.wpi.first.wpilibj.Gyro;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.templates.RobotMap;
import edu.wpi.first.wpili... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.subsystems;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.templates.RobotMap;
import edu.wpi.first... | Java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates.subsystems;
import edu.wpi.first.wpilibj.CANJaguar;
import edu.wpi.first.wpilibj.Gyro;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
im... | Java |
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory... | Java |
package org.bulatnig.smpp.net;
import org.bulatnig.smpp.pdu.Pdu;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.pdu.PduParser;
import java.io.IOException;
/**
* Connection with SMPP entity. Converts bytes to PDU and PDU to bytes. The same
* connection may be reused many times.
*
* @author Bu... | Java |
package org.bulatnig.smpp.net.impl;
import org.bulatnig.smpp.net.Connection;
import org.bulatnig.smpp.pdu.Pdu;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.pdu.PduParser;
import org.bulatnig.smpp.pdu.impl.DefaultPduParser;
import org.bulatnig.smpp.util.ByteBuffer;
import org.slf4j.Logger;
import... | Java |
package org.bulatnig.smpp;
/**
* General SMPP exception.
*
* @author Bulat Nigmatullin
*/
public class SmppException extends Exception {
public SmppException() {
super();
}
public SmppException(String message) {
super(message);
}
public SmppException(String message, Throwabl... | Java |
package org.bulatnig.smpp.pdu;
/**
* Standard PDU identificators.
*
* @author Bulat Nigmatullin
*/
public enum CommandId {
INSTANCE;
/**
* This is a generic negative acknowledgement to an SMPP PDU submitted with
* an invalid message header. A generic_nack response is returned in the
* follo... | Java |
package org.bulatnig.smpp.pdu;
/**
* Type of Number (TON).
*
* @author Bulat Nigmatullin
*/
public enum Ton {
INSTANCE;
/**
* Unknown.
*/
public static final int UNKNOWN = 0;
/**
* International.
*/
public static final int INTERNATIONAL = 1;
/**
* National.
*/... | Java |
package org.bulatnig.smpp.pdu;
import org.bulatnig.smpp.util.ByteBuffer;
/**
* Parses PDU's from bytes.
*
* @author Bulat Nigmatullin
*/
public interface PduParser {
/**
* Parse PDU.
*
* @param bb one pdu bytes
* @return Pdu
* @throws PduException pdu parsing failed
*/
Pdu p... | Java |
package org.bulatnig.smpp.pdu;
import org.bulatnig.smpp.SmppException;
/**
* PDU parsing failed.
*
* @author Bulat Nigmatullin
*/
public class PduException extends SmppException {
public PduException() {
super();
}
public PduException(String message) {
super(message);
}
publ... | Java |
package org.bulatnig.smpp.pdu;
/**
* Standard command statuses.
* <p/>
* The command_status field indicates the success or failure of an SMPP request.
* It is relevant only in the SMPP response PDU and it must contain a NULL value
* in an SMPP request PDU.
*
* @author Bulat Nigmatullin
*/
public enum CommandSt... | Java |
package org.bulatnig.smpp.pdu;
import org.bulatnig.smpp.util.ByteBuffer;
/**
* Protocol Data Unit.
*
* @author Bulat Nigmatullin
*/
public interface Pdu {
/**
* Header length.
*/
public static final int HEADER_LENGTH = 16;
/**
* Calculate and return PDU bytes.
*
* @return p... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.*;
import org.bulatnig.smpp.pdu.tlv.impl.DefaultTlvParser;
import org.bulatnig.smpp.pdu.tlv.TlvException;
import org.bulatnig.smpp.pdu.tlv.TlvParser;
import org.bulatnig.smpp.util.ByteBuffer;
/**
* Default PDU parser implementation.
*
* @author Bulat... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* BindTransceiver response PDU.
*
* @author Bulat Nigmatullin
*/
public class BindTra... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
/**
* EnquireLink response PDU.
*
* @author Bulat Nigmatullin
*/
public class EnquireLinkResp extends AbstractPdu {
public EnquireLinkResp() {
... | Java |
package org.bulatnig.smpp.pdu.impl;
import java.io.UnsupportedEncodingException;
/**
* SMSC Delivery Receipt parser.
* <p/>
* Examples:
* id:c449ab9744f47b6af1879e49e75e4f40 sub:001 dlvrd:0 submit date:0610191018 done date:0610191018 stat:ACCEPTD err:0 text:This is an Acti
* id:7220bb6bd0be98fa628de66590f80070 s... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* An ESME bound as a Transmitter is authorised to send short messages to the
* SMSC and... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* This message is sent by the SMSC to the ESME, when the SMSC has detected that
* a par... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
/**
* This message can be sent by either the ESME or SMSC and is used to provide a
* confidencecheck of the communication path between an ESME and an SMSC.... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* The deliver_sm is issued by the SMSC to send a message to an ESME. Using this
* comma... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
/**
* The purpose of the SMPP unbind operation is to deregister an instance of an
* ESME from the SMSC and inform the SMSC that the ESME no longer wishes t... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
/**
* This is a generic negative acknowledgement to an SMPP PDU submitted with an
* invalid message header. A generic_nack response is returned in the foll... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* This command is issued by the ESME to query the status of a previously
* submitted sh... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.CommandStatus;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* SubmitSm response PDU.
*
* @author Bulat... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* An ESME bound as a Receiver is authorised to receive short messages from the
* SMSC a... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* DeliverSm response PDU.
*
* @author Bulat Nigmatullin
*/
public class DeliverSmResp... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
/**
* Unbind Response PDU.
*
* @author Bulat Nigmatullin
*/
public class UnbindResp extends AbstractPdu {
public UnbindResp() {
super(Comman... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.Pdu;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.pdu.tlv.Tlv;
import org.bulatnig.smpp.pdu.tlv.TlvException;
import org.bulatnig.smpp.util.ByteBuffer;
import java.util.Map;
/**
* PDU header.
*
* @author Bulat Nigmatullin
*/
... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* BindReceiver response PDU.
*
* @author Bulat Nigmatullin
*/
public class BindReceiv... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* This operation is used by an ESME to submit a short message to the SMSC for
* onward ... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* BindTransmitter response PDU.
*
* @author Bulat Nigmatullin
*/
public class BindTra... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* QuerySM response PDU.
*
* @author Bulat Nigmatullin
*/
public class QuerySmResp ext... | Java |
package org.bulatnig.smpp.pdu.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.util.ByteBuffer;
import org.bulatnig.smpp.util.TerminatingNullNotFoundException;
/**
* An ESME bound as a Transceiver is allowed to send messages to the SMSC and
* receive ... | Java |
package org.bulatnig.smpp.pdu;
/**
* Numbric Plan Indicator (NPI).
*
* @author Bulat Nigmatullin
*/
public enum Npi {
INSTANCE;
/**
* Unknown.
*/
public static final int UNKNOWN = 0;
/**
* ISDN (E163/E164).
*/
public static final int ISDN = 1;
/**
* Data (X.121).
... | Java |
package org.bulatnig.smpp.pdu.tlv;
/**
* Standard TLV's Parameter Tags.
*
* @author Bulat Nigmatullin
*/
public enum ParameterTag {
INSTANCE;
/**
* The dest_addr_subunit parameter is used to route messages when received
* by a mobile station, for example to a smart card in the mobile station or
... | Java |
package org.bulatnig.smpp.pdu.tlv;
import org.bulatnig.smpp.util.ByteBuffer;
/**
* Optional Parameters are fields, which may be present in a message. Optional
* Parameters provide a mechanism for the future introduction of new parameters,
* as and when defined in future versions of the SMPP protocol.<br/>
* <p/>
... | Java |
package org.bulatnig.smpp.pdu.tlv;
import org.bulatnig.smpp.util.ByteBuffer;
import java.util.Map;
/**
* TLV parser.
*
* @author Bulat Nigmatullin
*/
public interface TlvParser {
/**
* Parse TLV's from bytes.
*
* @param bb byte buffer
* @return map parameter tag to tlv, may be null
... | Java |
package org.bulatnig.smpp.pdu.tlv.impl;
import org.bulatnig.smpp.pdu.tlv.Tlv;
import org.bulatnig.smpp.pdu.tlv.TlvException;
import org.bulatnig.smpp.util.ByteBuffer;
/**
* General TLV implementation.
*
* @author Bulat Nigmatullin
*/
public class TlvImpl implements Tlv {
private final int tag;
private b... | Java |
package org.bulatnig.smpp.pdu.tlv.impl;
import org.bulatnig.smpp.pdu.tlv.Tlv;
import org.bulatnig.smpp.pdu.tlv.TlvException;
import org.bulatnig.smpp.pdu.tlv.TlvParser;
import org.bulatnig.smpp.pdu.tlv.impl.TlvImpl;
import org.bulatnig.smpp.util.ByteBuffer;
import java.util.HashMap;
import java.util.Map;
/**
* Defa... | Java |
package org.bulatnig.smpp.pdu.tlv;
import org.bulatnig.smpp.SmppException;
/**
* TLV parsing failed.
*
* @author Bulat Nigmatullin
*/
public class TlvException extends SmppException {
public TlvException() {
super();
}
public TlvException(String message) {
super(message);
}
... | Java |
package org.bulatnig.smpp.util;
import org.bulatnig.smpp.SmppException;
/**
* C-Octet Sring terminating null character not found.
*
* @author Bulat Nigmatullin
*/
public class TerminatingNullNotFoundException extends SmppException {
public TerminatingNullNotFoundException() {
super("C-Octet String te... | Java |
package org.bulatnig.smpp.util;
import java.io.UnsupportedEncodingException;
/**
* Converts java types to byte array according to SMPP protocol.
* You should remember, that all SMPP simple numeric types are unsigned,
* but Java types are always signed.
* <p/>
* Not thread safe.
*
* @author Bulat Nigmatullin
*... | Java |
package org.bulatnig.smpp.session;
/**
* Session state.
*
* @author Bulat Nigmatullin
*/
public enum State {
CONNECTED,
DISCONNECTED,
RECONNECTING
}
| Java |
package org.bulatnig.smpp.session;
import org.bulatnig.smpp.pdu.Pdu;
import org.bulatnig.smpp.pdu.PduException;
import java.io.IOException;
/**
* Asynchronous session with SMSC.
* Supports connection by sending EnquireLink requests, session reuse (reconnect operations),
* automatically reconnects on IO failure af... | Java |
package org.bulatnig.smpp.session;
/**
* Track session connects and disconnects.
*
* @author Bulat Nigmatullin
*/
public interface StateListener {
/**
* Session state changed to new state.
*
* @param state new state
* @param e failure reason, may be null
*/
void changed(State stat... | Java |
package org.bulatnig.smpp.session.impl;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.Pdu;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.session.Session;
import org.bulatnig.smpp.session.MessageListener;
import org.bulatnig.smpp.session.StateListener;
import org.slf4j.Logge... | Java |
package org.bulatnig.smpp.session.impl;
import org.bulatnig.smpp.session.State;
import org.bulatnig.smpp.session.StateListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Session default state listener implementation. Just print new session state.
*
* @author Bulat Nigmatullin
*/
public class ... | Java |
package org.bulatnig.smpp.session.impl;
import org.bulatnig.smpp.pdu.Pdu;
import org.bulatnig.smpp.session.MessageListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Session default message listener implementation, just print received PDU's class names.
*
* @author Bulat Nigmatullin
*/
public... | Java |
package org.bulatnig.smpp.session.impl;
import org.bulatnig.smpp.net.Connection;
import org.bulatnig.smpp.pdu.CommandId;
import org.bulatnig.smpp.pdu.CommandStatus;
import org.bulatnig.smpp.pdu.Pdu;
import org.bulatnig.smpp.pdu.PduException;
import org.bulatnig.smpp.pdu.impl.EnquireLink;
import org.bulatnig.smpp.pdu.i... | Java |
package org.bulatnig.smpp.session;
import org.bulatnig.smpp.pdu.Pdu;
/**
* Session incoming messages listener.
*
* @author Bulat Nigmatullin
*/
public interface MessageListener {
/**
* Process incoming PDU.
*
* @param pdu incoming PDU from SMSC
*/
void received(Pdu pdu);
}
| Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.