当前位置: 首页>>代码示例>>Java>>正文


Java Long.toString方法代码示例

本文整理汇总了Java中java.lang.Long.toString方法的典型用法代码示例。如果您正苦于以下问题:Java Long.toString方法的具体用法?Java Long.toString怎么用?Java Long.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.lang.Long的用法示例。


在下文中一共展示了Long.toString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateGM

import java.lang.Long; //导入方法依赖的package包/类
void updateGM( long value, String name )
{
  mApp.mDData.updateGMName( mCIDid, mApp.mCID, name );
  String id = Long.toString(mCIDid);
  // CalibCBlock blk = mApp.mDData.selectGM( mCIDid, mApp.mCID );
  mSaveCBlock.setGroup( value );

  // if ( mApp.mListRefresh ) {
  //   mDataAdapter.notifyDataSetChanged();
  // } else {
    mSaveTextView.setText( id + " <" + name + "> " + mSaveData );
    mSaveTextView.setTextColor( mSaveCBlock.color() );
    // mSaveTextView.invalidate();
    // updateDisplay( ); // FIXME
  // }
}
 
开发者ID:marcocorvi,项目名称:topodroid,代码行数:17,代码来源:GMActivity.java

示例2: createDateInfo

import java.lang.Long; //导入方法依赖的package包/类
private static String createDateInfo(int second) {
    String currentTime = Long.toString(System.currentTimeMillis());
    while (currentTime.length() < 13) {
        currentTime = "0" + currentTime;
    }
    return currentTime + "-" + second + mSeparator;
}
 
开发者ID:YiuChoi,项目名称:MicroReader,代码行数:8,代码来源:CacheUtil.java

示例3: run

import java.lang.Long; //导入方法依赖的package包/类
public void run()
{
	try
	{
		String slaveAddress = socket.getInetAddress().getHostAddress();
		System.out.println("MasterThread: Received connection from a slave: " + slaveAddress);
		BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));

		String inputLine, outputLine;
		
		//read input stream
		inputLine = in.readLine(); //"time=?;<seq. no.>"
		System.out.println("incoming message: '" + inputLine + "' from " + slaveAddress);
		String[] parseIncomingMsg = inputLine.split(";");

		//process input stream and compute time
		String sequenceNumber = parseIncomingMsg[1];
		Long nowLong = new Long(new Date().getTime());
		outputLine = "time=;" + nowLong.toString() + ";" + sequenceNumber;
		System.out.println("Outgoing message: '" + outputLine + "' to " + slaveAddress);

		//send result
		Socket sendSocket = new Socket(slaveAddress, slaveSendPort);
		PrintWriter sendSocketOut = new PrintWriter(sendSocket.getOutputStream(), true);
		sendSocketOut.println(outputLine);
		sendSocketOut.close();
		sendSocket.close();

		in.close();
		socket.close();
	}
	catch (IOException e)
	{
		e.toString();
	}
}
 
开发者ID:dipakboyed,项目名称:cristians-clock-synch,代码行数:37,代码来源:MasterRespondThread.java

示例4: toString

import java.lang.Long; //导入方法依赖的package包/类
/**
 *  toString in the form of numerator/denominator.
 *  @return String
 */ 
public String toString ()
{
    return Long.toString (this.numerator) + "/" +
    Long.toString (this.denominator);
}
 
开发者ID:opf-labs,项目名称:jhove2,代码行数:10,代码来源:Rational.java


注:本文中的java.lang.Long.toString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。